mirror of
https://github.com/mattermost/mattermost.git
synced 2026-08-26 21:27:40 -05:00
MM-69293: Expect a 401 instead of a 403 after updating auth (#37493)
UpdateUserAuth now revokes all sessions, so we no longer expect a 403 on ResetSamlAuthDataToEmail, but a 401, since the client has been logged out.
This commit is contained in:
@@ -70,7 +70,8 @@ func TestSamlResetId(t *testing.T) {
|
||||
|
||||
_, resp, err := th.Client.ResetSamlAuthDataToEmail(context.Background(), false, false, nil)
|
||||
require.Error(t, err)
|
||||
CheckForbiddenStatus(t, resp)
|
||||
// UpdateUserAuth revoked all user's sessions, so this is now unauthorized
|
||||
CheckUnauthorizedStatus(t, resp)
|
||||
|
||||
numAffected, resp, err := th.SystemAdminClient.ResetSamlAuthDataToEmail(context.Background(), false, false, nil)
|
||||
require.NoError(t, err)
|
||||
|
||||
Reference in New Issue
Block a user