Modified Google Sign In provider to disconnect form both firebase and Google on sign out, added the apripriate test

This commit is contained in:
Mariano Uvalle 2019-02-27 00:16:15 -06:00
parent 307b51e95f
commit d47c75918f

View file

@ -38,11 +38,13 @@ main() {
test('should sign out a user', () {
final auth = MockFirebaseAuth();
final provider = GoogleSignInProvider(null, auth);
final googleSignIn = MockGoogleSignIn();
final provider = GoogleSignInProvider(googleSignIn, auth);
when(auth.signOut()).thenAnswer((_) => Future.value());
expect(provider.signOut(), completes);
verify(googleSignIn.disconnect());
});
});
}