mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-22 16:47:30 +00: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:
parent
c6a53c3172
commit
8cbd00592d
|
@ -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…
Reference in a new issue