Skip to content

Commit 2b53576

Browse files
committed
Full resend sspr process
1 parent 39fc405 commit 2b53576

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

MSAL/test/integration/native_auth/end_to_end/reset_password/MSALNativeAuthResetPasswordEndToEndTests.swift

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,21 @@ final class MSALNativeAuthResetPasswordEndToEndTests: MSALNativeAuthEndToEndBase
165165

166166
// Verify that the codes are different
167167
XCTAssertNotEqual(code1, code2, "Resent code should be different from the original code")
168+
169+
// Now submit the code...
170+
let newPasswordRequiredState = await retrieveAndSubmitCode(resetPasswordStartDelegate: resetPasswordStartDelegate,
171+
username: username,
172+
retries: codeRetryCount)
173+
174+
// Now submit the password...
175+
let resetPasswordCompletedExp = expectation(description: "reset password completed")
176+
let resetPasswordRequiredDelegate = ResetPasswordRequiredDelegateSpy(expectation: resetPasswordCompletedExp)
177+
178+
let uniquePassword = generateRandomPassword()
179+
newPasswordRequiredState?.submitPassword(password: uniquePassword, delegate: resetPasswordRequiredDelegate)
180+
181+
await fulfillment(of: [resetPasswordCompletedExp])
182+
XCTAssertTrue(resetPasswordRequiredDelegate.onResetPasswordCompletedCalled)
168183
}
169184

170185
// User Case 3.1.5 SSPR - Email is not found in records

0 commit comments

Comments
 (0)