Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
blaugold committed Apr 13, 2022
1 parent 6639abe commit 655f993
Showing 1 changed file with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,27 @@ void main() {
'scopes': <String>[],
'hostedDomain': null,
'clientId': fakeClientId,
'serverClientId': null,
}),
isMethodCall('signIn', arguments: null),
],
);
});

test('signIn prioritize serverClientId parameter when available', () async {
const String fakeServerClientId = 'fakeServerClientId';
googleSignIn = GoogleSignIn(serverClientId: fakeServerClientId);
await googleSignIn.signIn();
expect(googleSignIn.currentUser, isNotNull);
expect(
log,
<Matcher>[
isMethodCall('init', arguments: <String, dynamic>{
'signInOption': 'SignInOption.standard',
'scopes': <String>[],
'hostedDomain': null,
'clientId': null,
'serverClientId': fakeServerClientId,
}),
isMethodCall('signIn', arguments: null),
],
Expand Down Expand Up @@ -431,5 +452,6 @@ Matcher _isSignInMethodCall({String signInOption = 'SignInOption.standard'}) {
'scopes': <String>[],
'hostedDomain': null,
'clientId': null,
'serverClientId': null,
});
}

0 comments on commit 655f993

Please sign in to comment.