Modified Google Sign In provider to disconnect form both firebase and Google on sign out, added the apripriate test
This commit is contained in:
parent
307b51e95f
commit
d47c75918f
1 changed files with 3 additions and 1 deletions
|
|
@ -38,11 +38,13 @@ main() {
|
||||||
|
|
||||||
test('should sign out a user', () {
|
test('should sign out a user', () {
|
||||||
final auth = MockFirebaseAuth();
|
final auth = MockFirebaseAuth();
|
||||||
final provider = GoogleSignInProvider(null, auth);
|
final googleSignIn = MockGoogleSignIn();
|
||||||
|
final provider = GoogleSignInProvider(googleSignIn, auth);
|
||||||
|
|
||||||
when(auth.signOut()).thenAnswer((_) => Future.value());
|
when(auth.signOut()).thenAnswer((_) => Future.value());
|
||||||
|
|
||||||
expect(provider.signOut(), completes);
|
expect(provider.signOut(), completes);
|
||||||
|
verify(googleSignIn.disconnect());
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue