-
Notifications
You must be signed in to change notification settings - Fork 662
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
71cb403
commit 87d6018
Showing
10 changed files
with
221 additions
and
57 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
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 |
---|---|---|
|
@@ -97,8 +97,15 @@ class LinkSignupHandlerForInstantDebitsTest { | |
|
||
@Test | ||
fun `handleSignupFailure should call handleError with correct parameters`() = runTest { | ||
val testState = NetworkingLinkSignupState( | ||
validEmail = "[email protected]", | ||
validPhone = "+1234567890", | ||
isInstantDebits = true, | ||
payload = Async.Success(validPayload) | ||
) | ||
val error = RuntimeException("Test Error") | ||
handler.handleSignupFailure(error) | ||
|
||
handler.handleSignupFailure(testState, error) | ||
|
||
verify(handleError).invoke( | ||
extraMessage = "Error creating a Link account", | ||
|
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 |
---|---|---|
|
@@ -111,8 +111,14 @@ class LinkSignupHandlerForNetworkingTest { | |
@Test | ||
fun `handleSignupFailure should log error and navigate to Success pane`() = runTest { | ||
val error = RuntimeException("Test Error") | ||
val testState = NetworkingLinkSignupState( | ||
validEmail = "[email protected]", | ||
validPhone = "+1234567890", | ||
isInstantDebits = true, | ||
payload = Async.Success(validPayload) | ||
) | ||
|
||
handler.handleSignupFailure(error) | ||
handler.handleSignupFailure(testState, error) | ||
|
||
verify(eventTracker).logError( | ||
extraMessage = "Error saving account to Link", | ||
|
Oops, something went wrong.