[TESTS] createUser via the user model helper for integration tests (squash)
See https://codeberg.org/forgejo/forgejo/pulls/2295
This commit is contained in:
parent
c6a53c3172
commit
8cbd00592d
1 changed files with 1 additions and 2 deletions
|
@ -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() {
|
||||
|
|
Loading…
Add table
Reference in a new issue