use of com.google.firebase.auth.FirebaseAuthException in project FirebaseUI-Android by firebase.
the class SocialProviderResponseHandlerTest method testSignInIdp_disabled.
@Test
public void testSignInIdp_disabled() {
mHandler.getOperation().observeForever(mResultObserver);
when(mMockAuth.signInWithCredential(any(AuthCredential.class))).thenReturn(AutoCompleteTask.forFailure(new FirebaseAuthException("ERROR_USER_DISABLED", "disabled")));
IdpResponse response = new IdpResponse.Builder(new User.Builder(GoogleAuthProvider.PROVIDER_ID, TestConstants.EMAIL).build()).setToken(TestConstants.TOKEN).build();
mHandler.startSignIn(response);
verify(mResultObserver).onChanged(argThat(ResourceMatchers.isFailureWithCode(ErrorCodes.ERROR_USER_DISABLED)));
}
Aggregations