[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))
|
assert.NoError(t, db.Insert(ctx, user))
|
||||||
|
|
||||||
if len(user.Email) > 0 {
|
if len(user.Email) > 0 {
|
||||||
changePrimaryEmail := true
|
assert.NoError(t, user_service.ReplacePrimaryEmailAddress(ctx, user, user.Email))
|
||||||
assert.NoError(t, user_model.UpdateUser(ctx, user, changePrimaryEmail))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return func() {
|
return func() {
|
||||||
|
|
Loading…
Reference in a new issue