- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 21 for exports (0.19 sec)
-
tests/delete_test.go
t.Errorf("user's %v expects: %v, got %v", key, value, count) } } for key, value := range map[string]int64{"Account": 0, "Pets": 0, "Toys": 0, "Company": 1, "Manager": 1, "Team": 0, "Languages": 0, "Friends": 0} { if count := DB.Model(&user).Association(key).Count(); count != value { t.Errorf("user's %v expects: %v, got %v", key, value, count) } } }
Go - Registered: Sun Apr 21 09:35:09 GMT 2024 - Last Modified: Tue Oct 10 07:03:34 GMT 2023 - 9.4K bytes - Viewed (0) -
tests/joins_table_test.go
Go - Registered: Sun Apr 21 09:35:09 GMT 2024 - Last Modified: Thu Sep 10 13:46:18 GMT 2020 - 3.5K bytes - Viewed (0) -
tests/soft_delete_test.go
if DB.Model(&User{}).Where("name = ?", user.Name).Count(&count).Error != nil || count != 1 { t.Errorf("Count soft deleted record, expects: %v, got: %v", 1, count) } if DB.Model(&User{}).Select("age").Where("name = ?", user.Name).Scan(&age).Error != nil || age != user.Age { t.Errorf("Age soft deleted record, expects: %v, got: %v", 0, age) } if err := DB.Delete(&user).Error; err != nil {
Go - Registered: Sun Apr 21 09:35:09 GMT 2024 - Last Modified: Wed Feb 01 06:40:55 GMT 2023 - 5.7K bytes - Viewed (0) -
tests/count_test.go
t.Fatalf(fmt.Sprintf("Count should work, but got err %v", err)) } expects := []User{{Name: "main"}, {Name: "other"}, {Name: "other"}} sort.SliceStable(users, func(i, j int) bool { return strings.Compare(users[i].Name, users[j].Name) < 0 }) AssertEqual(t, users, expects) var count7 int64
Go - Registered: Sun Apr 21 09:35:09 GMT 2024 - Last Modified: Mon Oct 30 09:15:49 GMT 2023 - 6.9K bytes - Viewed (0) -
tests/embedded_struct_test.go
t.Errorf("embedded struct's value should be scanned correctly") } var egPosts []EngadgetPost if err := DB.Order("author_name asc").Find(&egPosts).Error; err != nil { t.Fatalf("no error should happen when query with embedded struct, but got %v", err) } expectAuthors := []string{"Edward", "George"} for i, post := range egPosts { t.Log(i, post.Author) if want := expectAuthors[i]; post.Author.Name != want {
Go - Registered: Sun Apr 21 09:35:09 GMT 2024 - Last Modified: Thu Oct 26 03:58:13 GMT 2023 - 7.3K bytes - Viewed (0) -
schema/relationship_test.go
t.Fatalf("expects 1 relations, but got %v", len(userSchema.Relationships.Relations)) } if createdByRel, ok := userSchema.Relationships.Relations["CreatedBy"]; ok { if createdByRel.FieldSchema != userSchema { t.Fatalf("expects same field schema, but got new %p, old %p", createdByRel.FieldSchema, userSchema) } } else { t.Fatalf("expects created by relations, but not found") } }
Go - Registered: Sun Apr 21 09:35:09 GMT 2024 - Last Modified: Mon Apr 15 03:20:20 GMT 2024 - 25.5K bytes - Viewed (0) -
tests/associations_test.go
t.Fatalf("member id is not equal: expects: %v, got: %v", profile.Refer, member.ProfileID) } DB.Model(&profile).Update("Refer", 100) var member2 Member if err := DB.First(&member2, "id = ?", member.ID).Error; err != nil { t.Fatalf("failed to find member, got error: %v", err) } else if member2.ProfileID != 100 { t.Fatalf("member id is not equal: expects: %v, got: %v", 100, member2.ProfileID) }
Go - Registered: Sun Apr 21 09:35:09 GMT 2024 - Last Modified: Wed Feb 08 08:29:09 GMT 2023 - 10.9K bytes - Viewed (0) -
clause/expression_test.go
if stmt.SQL.String() != result.Result { t.Errorf("generated SQL is not equal, expects %v, but got %v", result.Result, stmt.SQL.String()) } if !reflect.DeepEqual(result.ExpectedVars, stmt.Vars) { t.Errorf("generated vars is not equal, expects %v, but got %v", result.ExpectedVars, stmt.Vars) } }) } } func TestExpression(t *testing.T) {
Go - Registered: Sun Apr 21 09:35:09 GMT 2024 - Last Modified: Thu Aug 10 05:34:33 GMT 2023 - 8.4K bytes - Viewed (0) -
clause/clause_test.go
Go - Registered: Sun Apr 21 09:35:09 GMT 2024 - Last Modified: Tue Jun 02 02:50:38 GMT 2020 - 1012 bytes - Viewed (0) -
tests/sql_builder_test.go
Go - Registered: Sun Apr 21 09:35:09 GMT 2024 - Last Modified: Fri Jan 12 08:42:21 GMT 2024 - 16.7K bytes - Viewed (0)