-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Using the new sendVerificationCode API (#54)
- Loading branch information
Showing
4 changed files
with
33 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,13 +34,13 @@ class VerifyUserStateTests: XCTestCase { | |
|
||
func testVerifyUser_withSuccess_shouldSetNextStep() async throws { | ||
let destination = DeliveryDestination.email("[email protected]") | ||
authenticationService.mockedResendConfirmationCodeForAttributeResult = .init(destination: destination) | ||
authenticationService.mockedSendVerificationCodeForAttributeResult = .init(destination: destination) | ||
let task = Task { @MainActor in | ||
state.selectedField = .email | ||
} | ||
await task.value | ||
try await state.verifyUser() | ||
XCTAssertEqual(authenticationService.resendConfirmationCodeForAttributeCount, 1) | ||
XCTAssertEqual(authenticationService.sendVerificationCodeForAttributeCount, 1) | ||
XCTAssertEqual(authenticatorState.setCurrentStepCount, 1) | ||
let currentStep = try XCTUnwrap(authenticatorState.setCurrentStepValue) | ||
guard case .confirmVerifyUser(let attribute, let deliveryDetails) = currentStep else { | ||
|