Template
1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo synced 2024-11-22 09:54:24 +01:00

[TESTS] createUser via the user model helper for integration tests (squash)

See https://codeberg.org/forgejo/forgejo/pulls/2295
This commit is contained in:
Earl Warren 2024-02-05 15:06:51 +01:00
parent c6a53c3172
commit 8cbd00592d
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00

View file

@ -286,8 +286,7 @@ func createUser(ctx context.Context, t testing.TB, user *user_model.User) func()
assert.NoError(t, db.Insert(ctx, user))
if len(user.Email) > 0 {
changePrimaryEmail := true
assert.NoError(t, user_model.UpdateUser(ctx, user, changePrimaryEmail))
assert.NoError(t, user_service.ReplacePrimaryEmailAddress(ctx, user, user.Email))
}
return func() {