adding test around resending reset password email
This commit is contained in:
parent
4200b4b5e9
commit
3c03bae4c5
|
@ -499,6 +499,25 @@ class OnboardingViewModelTest {
|
||||||
.finish()
|
.finish()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
fun `given reset state, when resending reset password email, then emits reset success`() = runTest {
|
||||||
|
viewModelWith(initialState.copy(resetState = ResetState(AN_EMAIL, A_PASSWORD)))
|
||||||
|
val test = viewModel.test()
|
||||||
|
fakeLoginWizard.givenResetPasswordSuccess(AN_EMAIL)
|
||||||
|
fakeAuthenticationService.givenLoginWizard(fakeLoginWizard)
|
||||||
|
|
||||||
|
viewModel.handle(OnboardingAction.ResendResetPassword)
|
||||||
|
|
||||||
|
test
|
||||||
|
.assertStatesChanges(
|
||||||
|
initialState,
|
||||||
|
{ copy(isLoading = true) },
|
||||||
|
{ copy(isLoading = false) }
|
||||||
|
)
|
||||||
|
.assertNoEvents()
|
||||||
|
.finish()
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun `given can successfully confirm reset password, when confirm reset password, then emits reset success`() = runTest {
|
fun `given can successfully confirm reset password, when confirm reset password, then emits reset success`() = runTest {
|
||||||
viewModelWith(initialState.copy(resetState = ResetState(AN_EMAIL, A_PASSWORD)))
|
viewModelWith(initialState.copy(resetState = ResetState(AN_EMAIL, A_PASSWORD)))
|
||||||
|
|
Loading…
Reference in New Issue