- Sort Score
- Result 10 results
- Languages All
Results 41 - 50 of 87 for get_users (0.12 sec)
-
tests/count_test.go
t.Errorf("Count with group should be 2, but got count: %v", count2) } } func TestCount(t *testing.T) { var ( user1 = *GetUser("count-1", Config{}) user2 = *GetUser("count-2", Config{}) user3 = *GetUser("count-3", Config{}) users []User count, count1, count2 int64 ) DB.Save(&user1).Save(&user2).Save(&user3)
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Oct 30 09:15:49 UTC 2023 - 6.9K bytes - Viewed (0) -
tests/associations_has_one_test.go
t.Errorf("account's number should not be saved") } } func TestHasOneAssociationForSlice(t *testing.T) { users := []User{ *GetUser("slice-hasone-1", Config{Account: true}), *GetUser("slice-hasone-2", Config{Account: false}), *GetUser("slice-hasone-3", Config{Account: true}), } DB.Create(&users) // Count AssertAssociationCount(t, users, "Account", 2, "") // Find
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Jun 12 10:49:45 UTC 2024 - 7.1K bytes - Viewed (0) -
tests/helper_test.go
} if config.Company { user.Company = Company{Name: "company-" + name} } if config.Manager { user.Manager = GetUser(name+"_manager", Config{}) } for i := 0; i < config.Team; i++ { user.Team = append(user.Team, *GetUser(name+"_team_"+strconv.Itoa(i+1), Config{})) } for i := 0; i < config.Languages; i++ { name := name + "_locale_" + strconv.Itoa(i+1)
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Tue Mar 19 03:50:28 UTC 2024 - 8K bytes - Viewed (0) -
tests/connpool_test.go
} tx := db.Begin() user := *GetUser("transaction", Config{}) if err = tx.Save(&user).Error; err != nil { t.Fatalf("No error should raise, but got %v", err) } if err = tx.First(&User{}, "name = ?", "transaction").Error; err != nil { t.Fatalf("Should find saved record, but got %v", err) } user1 := *GetUser("transaction1-1", Config{})
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Tue Feb 06 02:54:40 UTC 2024 - 5.5K bytes - Viewed (0) -
tests/prepared_stmt_test.go
} ctx, cancel := context.WithTimeout(context.Background(), 500*time.Millisecond) defer cancel() txCtx := tx.WithContext(ctx) user := *GetUser("prepared_stmt", Config{}) txCtx.Create(&user) var result1 User if err := txCtx.Find(&result1, user.ID).Error; err != nil { t.Fatalf("no error should happen but got %v", err) }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Aug 22 11:02:05 UTC 2024 - 8.5K bytes - Viewed (0) -
tests/update_has_many_test.go
package tests_test import ( "testing" "gorm.io/gorm" . "gorm.io/gorm/utils/tests" ) func TestUpdateHasManyAssociations(t *testing.T) { user := *GetUser("update-has-many", Config{}) if err := DB.Create(&user).Error; err != nil { t.Fatalf("errors happened when create: %v", err) } user.Pets = []*Pet{{Name: "pet1"}, {Name: "pet2"}} if err := DB.Save(&user).Error; err != nil {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Jan 06 07:02:53 UTC 2022 - 2K bytes - Viewed (0) -
cmd/jwt.go
} claims := xjwt.NewMapClaims() if err := xjwt.ParseWithClaims(token, claims, func(claims *xjwt.MapClaims) ([]byte, error) { if claims.AccessKey != globalActiveCred.AccessKey { u, ok := globalIAMSys.GetUser(req.Context(), claims.AccessKey) if !ok { // Credentials will be invalid but for disabled // return a different error in such a scenario. if u.Credentials.Status == auth.AccountOff {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Jul 22 07:04:48 UTC 2024 - 4.5K bytes - Viewed (0) -
cmd/iam.go
case <-sys.configLoaded: default: err = sys.store.LoadUser(ctx, accessKey) loadUserCalled = true } u, ok = sys.store.GetUser(accessKey) if !ok && !loadUserCalled { err = sys.store.LoadUser(ctx, accessKey) loadUserCalled = true u, ok = sys.store.GetUser(accessKey) } if !ok && loadUserCalled && err != nil { iamLogOnceIf(ctx, err, accessKey) // return 503 to application
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Oct 29 16:01:48 UTC 2024 - 74.6K bytes - Viewed (0) -
tests/update_belongs_to_test.go
package tests_test import ( "testing" "gorm.io/gorm" . "gorm.io/gorm/utils/tests" ) func TestUpdateBelongsTo(t *testing.T) { user := *GetUser("update-belongs-to", Config{}) if err := DB.Create(&user).Error; err != nil { t.Fatalf("errors happened when create: %v", err) } user.Company = Company{Name: "company-belongs-to-association"} user.Manager = &User{Name: "manager-belongs-to-association"}
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Jul 14 06:55:54 UTC 2022 - 1.6K bytes - Viewed (0) -
tests/update_many2many_test.go
package tests_test import ( "testing" "gorm.io/gorm" . "gorm.io/gorm/utils/tests" ) func TestUpdateMany2ManyAssociations(t *testing.T) { user := *GetUser("update-many2many", Config{}) if err := DB.Create(&user).Error; err != nil { t.Fatalf("errors happened when create: %v", err) } user.Languages = []Language{{Code: "zh-CN", Name: "Chinese"}, {Code: "en", Name: "English"}} for _, lang := range user.Languages {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Jan 06 07:02:53 UTC 2022 - 1.3K bytes - Viewed (0)