test case for single parameter for Open

This commit is contained in:
Baiju Muthukadan 2016-10-08 21:52:15 +05:30
parent 0d54677e13
commit bd513dd580
1 changed files with 10 additions and 0 deletions

View File

@ -754,6 +754,16 @@ func TestDdlErrors(t *testing.T) {
}
}
func TestOpenWithOneParameter(t *testing.T) {
db, err := gorm.Open("dialect")
if db != nil {
t.Error("Open with one parameter returned non nil for db")
}
if err == nil {
t.Error("Open with one parameter returned err as nil")
}
}
func BenchmarkGorm(b *testing.B) {
b.N = 2000
for x := 0; x < b.N; x++ {