Skip to content

Commit eb26d79

Browse files
committed
Fix deprecations in facebook tests
1 parent 36860d6 commit eb26d79

File tree

4 files changed

+72
-59
lines changed

4 files changed

+72
-59
lines changed

FacebookAuth/FirebaseFacebookAuthUITests/FUIFacebookAuthTest.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ @interface FBSDKLoginManagerTest : FBSDKLoginManager
2323

2424
@implementation FBSDKLoginManagerTest
2525

26-
- (void)logInWithReadPermissions:(NSArray *)permissions
27-
fromViewController:(UIViewController *)fromViewController
28-
handler:(FBSDKLoginManagerLoginResultBlock)handler {
26+
- (void)logInWithPermissions:(NSArray *)permissions
27+
fromViewController:(UIViewController *)fromViewController
28+
handler:(FBSDKLoginManagerLoginResultBlock)handler {
2929
handler(self.result, self.error);
3030
}
3131
@end

FacebookAuth/FirebaseFacebookAuthUITests/FirebaseFacebookAuthUITests.m

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -83,20 +83,21 @@ - (void)testSuccessfullLogin {
8383
dataAccessExpirationDate:nil];
8484
id mockToken = OCMPartialMock(token);
8585

86+
NSSet *emptySet = [NSSet set];
8687
FBSDKLoginManagerLoginResult *result = [[FBSDKLoginManagerLoginResult alloc] initWithToken:mockToken
8788
isCancelled:NO
88-
grantedPermissions:nil
89-
declinedPermissions:nil];
89+
grantedPermissions:emptySet
90+
declinedPermissions:emptySet];
9091
XCTAssertNil(_provider.accessToken);
9192
[self.provider configureLoginManager:result withError:nil];
9293

9394
XCTestExpectation *expectation = [self expectationWithDescription:@"logged in"];
94-
[self.provider signInWithEmail:nil
95-
presentingViewController:nil
96-
completion:^(FIRAuthCredential *_Nullable credential,
97-
NSError *_Nullable error,
98-
FIRAuthResultCallback _Nullable result,
99-
NSDictionary *_Nullable userInfo) {
95+
[self.provider signInWithDefaultValue:nil
96+
presentingViewController:nil
97+
completion:^(FIRAuthCredential *_Nullable credential,
98+
NSError *_Nullable error,
99+
FIRAuthResultCallback _Nullable result,
100+
NSDictionary *_Nullable userInfo) {
100101
XCTAssertNil(error);
101102
XCTAssertNotNil(credential);
102103
XCTAssertNotNil(result);
@@ -128,17 +129,17 @@ - (void)testCancelLogin {
128129
id mockToken = OCMPartialMock(token);
129130
FBSDKLoginManagerLoginResult *result = [[FBSDKLoginManagerLoginResult alloc] initWithToken:mockToken
130131
isCancelled:YES
131-
grantedPermissions:nil
132-
declinedPermissions:nil];
132+
grantedPermissions:[NSSet set]
133+
declinedPermissions:[NSSet set]];
133134
[self.provider configureLoginManager:result withError:nil];
134135

135136
XCTestExpectation *expectation = [self expectationWithDescription:@"logged in"];
136-
[self.provider signInWithEmail:nil
137-
presentingViewController:nil
138-
completion:^(FIRAuthCredential *_Nullable credential,
139-
NSError *_Nullable error,
140-
FIRAuthResultCallback _Nullable result,
141-
NSDictionary *_Nullable userInfo) {
137+
[self.provider signInWithDefaultValue:nil
138+
presentingViewController:nil
139+
completion:^(FIRAuthCredential *_Nullable credential,
140+
NSError *_Nullable error,
141+
FIRAuthResultCallback _Nullable result,
142+
NSDictionary *_Nullable userInfo) {
142143
XCTAssertNotNil(error);
143144
XCTAssertEqual(error.code, FUIAuthErrorCodeUserCancelledSignIn);
144145
XCTAssertNil(credential);
@@ -161,12 +162,12 @@ - (void)testErrorLogin {
161162
[self.provider configureLoginManager:nil withError:testError];
162163

163164
XCTestExpectation *expectation = [self expectationWithDescription:@"logged in"];
164-
[self.provider signInWithEmail:nil
165-
presentingViewController:nil
166-
completion:^(FIRAuthCredential *_Nullable credential,
167-
NSError *_Nullable error,
168-
FIRAuthResultCallback _Nullable result,
169-
NSDictionary *_Nullable userInfo) {
165+
[self.provider signInWithDefaultValue:nil
166+
presentingViewController:nil
167+
completion:^(FIRAuthCredential *_Nullable credential,
168+
NSError *_Nullable error,
169+
FIRAuthResultCallback _Nullable result,
170+
NSDictionary *_Nullable userInfo) {
170171
XCTAssertNotNil(error);
171172
XCTAssertEqual(error.userInfo[NSUnderlyingErrorKey], testError);
172173
XCTAssertNil(credential);

FacebookAuth/Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
source 'sso://cpdc-internal/firebase'
1+
# source 'sso://cpdc-internal/firebase'
22
source 'https://github.com/CocoaPods/Specs.git'
33

44
platform :ios, '8.0'

FacebookAuth/Podfile.lock

Lines changed: 45 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,47 @@
11
PODS:
2-
- FBSDKCoreKit (5.0.0):
3-
- FBSDKCoreKit/Basics (= 5.0.0)
4-
- FBSDKCoreKit/Core (= 5.0.0)
5-
- FBSDKCoreKit/Basics (5.0.0)
6-
- FBSDKCoreKit/Core (5.0.0):
2+
- FBSDKCoreKit (5.0.1):
3+
- FBSDKCoreKit/Basics (= 5.0.1)
4+
- FBSDKCoreKit/Core (= 5.0.1)
5+
- FBSDKCoreKit/Basics (5.0.1)
6+
- FBSDKCoreKit/Core (5.0.1):
77
- FBSDKCoreKit/Basics
8-
- FBSDKLoginKit (5.0.0):
9-
- FBSDKCoreKit (= 5.0.0)
10-
- Firebase/Auth (5.20.2):
8+
- FBSDKLoginKit (5.0.1):
9+
- FBSDKCoreKit (~> 5.0)
10+
- Firebase/Auth (6.1.0):
1111
- Firebase/CoreOnly
12-
- FirebaseAuth (= 5.4.2)
13-
- Firebase/CoreOnly (5.20.2):
14-
- FirebaseCore (= 5.4.1)
15-
- FirebaseAuth (5.4.2):
12+
- FirebaseAuth (~> 6.1.0)
13+
- Firebase/CoreOnly (6.1.0):
14+
- FirebaseCore (= 6.0.1)
15+
- FirebaseAuth (6.1.0):
1616
- FirebaseAuthInterop (~> 1.0)
17-
- FirebaseCore (~> 5.2)
18-
- GoogleUtilities/Environment (~> 5.2)
17+
- FirebaseCore (~> 6.0)
18+
- GoogleUtilities/AppDelegateSwizzler (~> 6.0)
19+
- GoogleUtilities/Environment (~> 6.0)
1920
- GTMSessionFetcher/Core (~> 1.1)
2021
- FirebaseAuthInterop (1.0.0)
21-
- FirebaseCore (5.4.1):
22-
- GoogleUtilities/Environment (~> 5.2)
23-
- GoogleUtilities/Logger (~> 5.2)
24-
- FirebaseUI/Auth (6.2.1):
25-
- Firebase/Auth (~> 5.4)
22+
- FirebaseCore (6.0.1):
23+
- GoogleUtilities/Environment (~> 6.0)
24+
- GoogleUtilities/Logger (~> 6.0)
25+
- FirebaseUI/Auth (7.0.0):
26+
- Firebase/Auth (~> 6.0)
2627
- GoogleUtilities/UserDefaults
27-
- GoogleUtilities/Environment (5.8.0)
28-
- GoogleUtilities/Logger (5.8.0):
28+
- GoogleUtilities/AppDelegateSwizzler (6.2.0):
2929
- GoogleUtilities/Environment
30-
- GoogleUtilities/UserDefaults (5.8.0):
3130
- GoogleUtilities/Logger
32-
- GTMSessionFetcher/Core (1.2.1)
31+
- GoogleUtilities/Network
32+
- GoogleUtilities/Environment (6.2.0)
33+
- GoogleUtilities/Logger (6.2.0):
34+
- GoogleUtilities/Environment
35+
- GoogleUtilities/Network (6.2.0):
36+
- GoogleUtilities/Logger
37+
- "GoogleUtilities/NSData+zlib"
38+
- GoogleUtilities/Reachability
39+
- "GoogleUtilities/NSData+zlib (6.2.0)"
40+
- GoogleUtilities/Reachability (6.2.0):
41+
- GoogleUtilities/Logger
42+
- GoogleUtilities/UserDefaults (6.2.0):
43+
- GoogleUtilities/Logger
44+
- GTMSessionFetcher/Core (1.2.2)
3345
- OCMock (3.4.3)
3446

3547
DEPENDENCIES:
@@ -55,17 +67,17 @@ EXTERNAL SOURCES:
5567
:path: "../"
5668

5769
SPEC CHECKSUMS:
58-
FBSDKCoreKit: ba361d4a9d4dc29ff218822b849b22d4f869c7bb
59-
FBSDKLoginKit: c6d0dc187bd076e370dffa10f7fc8a3562a6892c
60-
Firebase: 0c8cf33f266410c61ab3e2265cfa412200351d9c
61-
FirebaseAuth: dd7bbf03a5aee0eafb3a1aee4d2812bd74bac890
70+
FBSDKCoreKit: 4a19534474ade7c71bd016d800aa5e7722bcdda1
71+
FBSDKLoginKit: 41efa754b909b0ea813fa9a8596dacc8ed196d50
72+
Firebase: 8d77bb33624ae9b62d745d82ec023de5f70f7e4f
73+
FirebaseAuth: 4281d6d98a90881e00710fa8d9e37c2ccdfc7d80
6274
FirebaseAuthInterop: 0ffa57668be100582bb7643d4fcb7615496c41fc
63-
FirebaseCore: f1a9a8be1aee4bf71a2fc0f4096df6788bdfda61
64-
FirebaseUI: a2edbe63a90dff4a9ac715f4dd2869411528eedc
65-
GoogleUtilities: 04fce34bcd5620c1ee76fb79172105c74a4df335
66-
GTMSessionFetcher: 32aeca0aa144acea523e1c8e053089dec2cb98ca
75+
FirebaseCore: 66bdef3b310a026880e2a5bc8aa586ab62ce4543
76+
FirebaseUI: f9367cd5cacde991d9bcce9278d3fcb858f84f6a
77+
GoogleUtilities: 996e0db07153674fd1b54b220fda3a3dc3547cba
78+
GTMSessionFetcher: 61bb0f61a4cb560030f1222021178008a5727a23
6779
OCMock: 43565190abc78977ad44a61c0d20d7f0784d35ab
6880

69-
PODFILE CHECKSUM: 4a628fc1e0dd4b8135687af583b15c395645a8d1
81+
PODFILE CHECKSUM: d4087ca55e7289fffba35c7dae37752581dfdfe2
7082

71-
COCOAPODS: 1.6.1
83+
COCOAPODS: 1.7.0

0 commit comments

Comments
 (0)