-
Notifications
You must be signed in to change notification settings - Fork 227
test(Auth): resendSignUpCode unit tests #935
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report
@@ Coverage Diff @@
## main #935 +/- ##
==========================================
- Coverage 69.75% 69.37% -0.38%
==========================================
Files 811 894 +83
Lines 34258 37165 +2907
==========================================
+ Hits 23895 25785 +1890
- Misses 10363 11380 +1017
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
royjit
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - with minor comments
| switch result { | ||
| case .success(let authCodeDeliveryDetails): | ||
| guard case .email = authCodeDeliveryDetails.destination else { | ||
| XCTFail("Result should be .done for next step") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| XCTFail("Result should be .done for next step") | |
| XCTFail("Result should be . email for next step") |
| /// - When: | ||
| /// - I invoke resendSignUpCode with username | ||
| /// - Then: | ||
| /// - I should get a successful result with .email as the destination of AuthCodeDeliveryDetails |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| /// - I should get a successful result with .email as the destination of AuthCodeDeliveryDetails | |
| /// - I should get a failure with validation error |
| XCTFail("Received failure with error \(error)") | ||
| } | ||
| } | ||
| wait(for: [resultExpectation], timeout: 2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use the timeout value from the base class
Description of changes:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.