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

Commit 655f993

Browse files
committed
Fix tests
1 parent 6639abe commit 655f993

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

packages/google_sign_in/google_sign_in/test/google_sign_in_test.dart

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,27 @@ void main() {
9696
'scopes': <String>[],
9797
'hostedDomain': null,
9898
'clientId': fakeClientId,
99+
'serverClientId': null,
100+
}),
101+
isMethodCall('signIn', arguments: null),
102+
],
103+
);
104+
});
105+
106+
test('signIn prioritize serverClientId parameter when available', () async {
107+
const String fakeServerClientId = 'fakeServerClientId';
108+
googleSignIn = GoogleSignIn(serverClientId: fakeServerClientId);
109+
await googleSignIn.signIn();
110+
expect(googleSignIn.currentUser, isNotNull);
111+
expect(
112+
log,
113+
<Matcher>[
114+
isMethodCall('init', arguments: <String, dynamic>{
115+
'signInOption': 'SignInOption.standard',
116+
'scopes': <String>[],
117+
'hostedDomain': null,
118+
'clientId': null,
119+
'serverClientId': fakeServerClientId,
99120
}),
100121
isMethodCall('signIn', arguments: null),
101122
],
@@ -431,5 +452,6 @@ Matcher _isSignInMethodCall({String signInOption = 'SignInOption.standard'}) {
431452
'scopes': <String>[],
432453
'hostedDomain': null,
433454
'clientId': null,
455+
'serverClientId': null,
434456
});
435457
}

0 commit comments

Comments
 (0)