@@ -9,6 +9,7 @@ import 'package:flutter_test/flutter_test.dart';
9
9
10
10
void main () {
11
11
const String kMockSignInProvider = 'password' ;
12
+ const String kMockSignInSecondFactor = 'phone' ;
12
13
const String kMockToken = 'test-token' ;
13
14
const int kMockExpirationTimestamp = 1234566 ;
14
15
const int kMockAuthTimestamp = 1234567 ;
@@ -23,6 +24,7 @@ void main() {
23
24
authTimestamp: kMockAuthTimestamp,
24
25
expirationTimestamp: kMockExpirationTimestamp,
25
26
signInProvider: kMockSignInProvider,
27
+ signInSecondFactor: kMockSignInSecondFactor,
26
28
token: kMockToken);
27
29
28
30
group ('$IdTokenResult ' , () {
@@ -38,6 +40,8 @@ void main() {
38
40
expect (idTokenResult.issuedAtTime! .millisecondsSinceEpoch,
39
41
equals (kMockIssuedAtTimestamp));
40
42
expect (idTokenResult.signInProvider, equals (kMockSignInProvider));
43
+ expect (
44
+ idTokenResult.signInSecondFactor, equals (kMockSignInSecondFactor));
41
45
expect (idTokenResult.token, equals (kMockToken));
42
46
});
43
47
});
@@ -53,6 +57,7 @@ void main() {
53
57
authTimestamp: kMockAuthTimestamp,
54
58
expirationTimestamp: kMockExpirationTimestamp,
55
59
signInProvider: kMockSignInProvider,
60
+ signInSecondFactor: kMockSignInSecondFactor,
56
61
token: kMockToken);
57
62
58
63
final testIdTokenResult = IdTokenResult (kMockData);
@@ -62,7 +67,7 @@ void main() {
62
67
63
68
test ('toString()' , () {
64
69
expect (idTokenResult.toString (),
65
- '$IdTokenResult (authTime: ${idTokenResult .authTime }, claims: $kMockClaims , expirationTime: ${idTokenResult .expirationTime }, issuedAtTime: ${idTokenResult .issuedAtTime }, signInProvider: $kMockSignInProvider , token: $kMockToken )' );
70
+ '$IdTokenResult (authTime: ${idTokenResult .authTime }, claims: $kMockClaims , expirationTime: ${idTokenResult .expirationTime }, issuedAtTime: ${idTokenResult .issuedAtTime }, signInProvider: $kMockSignInProvider , signInSecondFactor: $ kMockSignInSecondFactor , token: $kMockToken )' );
66
71
});
67
72
});
68
73
}
0 commit comments