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:
Alejandro García Montoro
2026-07-14 17:17:31 +02:00
committed by GitHub
parent 2d8a5f94ba
commit 04c3524aa7
+2 -1
View File
@@ -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)