mirror of
https://github.com/mattermost/mattermost.git
synced 2026-05-28 04:35:04 -04:00
Fix invite test setup for deactivated-user case
This commit is contained in:
parent
6d016b81b7
commit
f238ca2823
1 changed files with 6 additions and 1 deletions
|
|
@ -4080,8 +4080,13 @@ func TestInviteUsersToTeam(t *testing.T) {
|
|||
}, "rate limits")
|
||||
|
||||
th.TestForAllClients(t, func(t *testing.T, client *model.Client4) {
|
||||
th.App.UpdateConfig(func(cfg *model.Config) { *cfg.TeamSettings.RestrictCreationToDomains = "" })
|
||||
th.BasicTeam.AllowedDomains = ""
|
||||
_, appErr := th.App.UpdateTeam(th.BasicTeam)
|
||||
require.Nil(t, appErr)
|
||||
|
||||
deactivatedUser := th.CreateUser(t)
|
||||
_, appErr := th.App.UpdateActive(th.Context, deactivatedUser, false)
|
||||
_, appErr = th.App.UpdateActive(th.Context, deactivatedUser, false)
|
||||
require.Nil(t, appErr)
|
||||
|
||||
invitesWithErrors, _, err := client.InviteUsersToTeamGracefully(context.Background(), th.BasicTeam.Id, []string{deactivatedUser.Email, user1})
|
||||
|
|
|
|||
Loading…
Reference in a new issue