File tree Expand file tree Collapse file tree 2 files changed +2
-3
lines changed
main/java/com/amplifyframework/ui/authenticator
test/java/com/amplifyframework/ui/authenticator Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -582,7 +582,6 @@ internal class AuthenticatorViewModel(
582
582
logger.error(result.error.toString())
583
583
logger.error(" Current signed in user session has expired, signing out." )
584
584
signOut()
585
- moveTo(AuthenticatorStep .SignIn )
586
585
} else {
587
586
handleGeneralFailure(result.error)
588
587
}
Original file line number Diff line number Diff line change @@ -133,7 +133,7 @@ class AuthenticatorViewModelTest {
133
133
}
134
134
135
135
@Test
136
- fun `getCurrentUser error with session expired exception during start results in SignIn state ` () = runTest {
136
+ fun `getCurrentUser error with session expired exception during start results in being signed out ` () = runTest {
137
137
coEvery { authProvider.fetchAuthSession() } returns Success (mockAuthSession(isSignedIn = true ))
138
138
coEvery { authProvider.getCurrentUser() } returns AmplifyResult .Error (SessionExpiredException ())
139
139
@@ -143,8 +143,8 @@ class AuthenticatorViewModelTest {
143
143
coVerify(exactly = 1 ) {
144
144
authProvider.fetchAuthSession()
145
145
authProvider.getCurrentUser()
146
+ authProvider.signOut()
146
147
}
147
- viewModel.currentStep shouldBe AuthenticatorStep .SignIn
148
148
}
149
149
150
150
@Test
You can’t perform that action at this time.
0 commit comments