- Sort Score
- Result 10 results
- Languages All
Results 11 - 13 of 13 for AssertObjEqual (0.08 sec)
-
tests/query_test.go
t.Fatalf("Failed to query smaller user, got error %v", err) } AssertObjEqual(t, user, simpleUser, "Name", "ID", "UpdatedAt", "CreatedAt") var simpleUser2 SimpleUser if err := DB.Model(&User{}).Select("id").First(&simpleUser2, user.ID).Error; err != nil { t.Fatalf("Failed to query smaller user, got error %v", err) } AssertObjEqual(t, user, simpleUser2, "ID") var simpleUsers []SimpleUser
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Jun 24 09:42:59 UTC 2024 - 50.4K bytes - Viewed (0) -
tests/hooks_test.go
if err := DB.First(&resultClone, "name = ?", "Nice_clone").Error; err != nil { t.Fatalf("Failed to find cloned product, got error: %v", err) } result.Price *= 2 result.Name += "_clone" AssertObjEqual(t, result, resultClone, "Price", "Name") DB.Model(&result).Update("Price", 500) var result2 Product2 DB.First(&result2, "name = ?", "Nice") if result2.Price != 500 {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Jun 17 03:59:06 UTC 2024 - 16.7K bytes - Viewed (0) -
tests/create_test.go
t.Fatalf("failed to create, got error %v", err) } newProd := &CompositeKeyProduct{} if err := DB.First(&newProd).Error; err != nil { t.Fatalf("errors happened when query: %v", err) } else { AssertObjEqual(t, newProd, prod, "ProductID", "LanguageCode", "Code", "Name") } } func TestCreateOnConflictWithDefaultNull(t *testing.T) { type OnConflictUser struct { ID string
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Tue Mar 19 03:50:28 UTC 2024 - 26.4K bytes - Viewed (0)