Remove Debug mode from test code

This commit is contained in:
Jinzhu 2019-06-13 12:20:11 +08:00
parent 835ca6ca93
commit 5acd5e20e6
1 changed files with 3 additions and 4 deletions

View File

@ -1293,12 +1293,11 @@ func TestWhereUpdates(t *testing.T) {
OwnerEntity OwnerEntity `gorm:"polymorphic:Owner"`
}
db := DB.Debug()
db.DropTable(&SomeEntity{})
db.AutoMigrate(&SomeEntity{})
DB.DropTable(&SomeEntity{})
DB.AutoMigrate(&SomeEntity{})
a := SomeEntity{Name: "test"}
db.Model(&a).Where(a).Updates(SomeEntity{Name: "test2"})
DB.Model(&a).Where(a).Updates(SomeEntity{Name: "test2"})
}
func BenchmarkGorm(b *testing.B) {