MCPcopy
hub / github.com/go-gorm/gorm / TestOpen

Function TestOpen

tests/gorm_test.go:11–17  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

9)
10
11func TestOpen(t *testing.T) {
12 dsn := "gorm:gorm@tcp(localhost:9910)/gorm?loc=Asia%2FHongKong" // invalid loc
13 _, err := gorm.Open(mysql.Open(dsn), &gorm.Config{})
14 if err == nil {
15 t.Fatalf("should returns error but got nil")
16 }
17}
18
19func TestReturningWithNullToZeroValues(t *testing.T) {
20 dialect := DB.Dialector.Name()

Callers

nothing calls this directly

Calls 1

OpenFunction · 0.92

Tested by

no test coverage detected