Skip to content

Commit

Permalink
fix(test): fix signOut mock error (see atn832/google_sign_in_mocks#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
gruvw committed Mar 22, 2024
1 parent b8910f5 commit c33c03e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion test/component/utils/firebase/testing_login_providers.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,15 @@ final firebaseMocksOverrides = [
googleSignInProvider.overrideWith(mockGoogleSignIn),
];

class MockGoogleSignInAddition extends MockGoogleSignIn {
@override
Future<GoogleSignInAccount?> signOut() async {
return Future.value(null);
}
}

GoogleSignIn mockGoogleSignIn(ProviderRef<GoogleSignIn> ref) {
return MockGoogleSignIn();
return MockGoogleSignInAddition();
}

FirebaseAuth mockFirebaseAuth(ProviderRef<FirebaseAuth> ref) {
Expand Down

0 comments on commit c33c03e

Please sign in to comment.