Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implement sign out method #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions lib/src/google_sign_in_mocks_base.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,14 @@ class MockGoogleSignIn extends Mock implements GoogleSignIn {
@override
Future<GoogleSignInAccount?> signIn() {
_currentUser = MockGoogleSignInAccount();
return Future.value(_isCancelled ? null : _currentUser);
return Future.value(_isCancelled ? null : _currentUser);
}

@override
Future<GoogleSignInAccount?> signOut() {
final currentUser = _currentUser;
_currentUser = null;
return Future.value(_isCancelled ? null : currentUser);
}
}

Expand All @@ -34,7 +41,8 @@ class MockGoogleSignInAccount extends Mock implements GoogleSignInAccount {
}
}

class MockGoogleSignInAuthentication extends Mock implements GoogleSignInAuthentication {
class MockGoogleSignInAuthentication extends Mock
implements GoogleSignInAuthentication {
@override
String get idToken => 'idToken';

Expand Down