aboutsummaryrefslogtreecommitdiffhomepage
path: root/Example/Auth/Tests/FIRAuthTests.m
diff options
context:
space:
mode:
authorGravatar Zsika Phillip <protocol86@users.noreply.github.com>2018-04-25 21:50:19 -0700
committerGravatar Paul Beusterien <paulbeusterien@google.com>2018-04-26 06:55:00 -0700
commit5bb6e0f091b76ed8a02ce402d766cf4e26d33784 (patch)
treeb7bfb4575eff99c1b61bf2431d2b4a8b3867bb00 /Example/Auth/Tests/FIRAuthTests.m
parent7707f37c770212c69d9ca4b36fba7e3ae193c108 (diff)
Adds new callback to createUse API (breaking change) (#1186)
Diffstat (limited to 'Example/Auth/Tests/FIRAuthTests.m')
-rw-r--r--Example/Auth/Tests/FIRAuthTests.m15
1 files changed, 9 insertions, 6 deletions
diff --git a/Example/Auth/Tests/FIRAuthTests.m b/Example/Auth/Tests/FIRAuthTests.m
index d238057..34c0499 100644
--- a/Example/Auth/Tests/FIRAuthTests.m
+++ b/Example/Auth/Tests/FIRAuthTests.m
@@ -1592,9 +1592,9 @@ static const NSTimeInterval kWaitInterval = .5;
[[FIRAuth auth] signOut:NULL];
[[FIRAuth auth] createUserWithEmail:kEmail
password:kFakePassword
- completion:^(FIRUser *_Nullable user, NSError *_Nullable error) {
+ completion:^(FIRAuthDataResult *_Nullable result, NSError *_Nullable error) {
XCTAssertTrue([NSThread isMainThread]);
- [self assertUser:user];
+ [self assertUser:result.user];
XCTAssertNil(error);
[expectation fulfill];
}];
@@ -1614,9 +1614,10 @@ static const NSTimeInterval kWaitInterval = .5;
[[FIRAuth auth] signOut:NULL];
[[FIRAuth auth] createUserWithEmail:kEmail
password:kFakePassword
- completion:^(FIRUser *_Nullable user, NSError *_Nullable error) {
+ completion:^(FIRAuthDataResult *_Nullable result,
+ NSError *_Nullable error) {
XCTAssertTrue([NSThread isMainThread]);
- XCTAssertNil(user);
+ XCTAssertNil(result.user);
XCTAssertEqual(error.code, FIRAuthErrorCodeWeakPassword);
XCTAssertNotNil(error.userInfo[NSLocalizedDescriptionKey]);
XCTAssertEqualObjects(error.userInfo[NSLocalizedFailureReasonErrorKey], reason);
@@ -1700,7 +1701,8 @@ static const NSTimeInterval kWaitInterval = .5;
[[FIRAuth auth] signOut:NULL];
[[FIRAuth auth] createUserWithEmail:kEmail
password:@""
- completion:^(FIRUser *_Nullable user, NSError *_Nullable error) {
+ completion:^(FIRAuthDataResult *_Nullable result,
+ NSError *_Nullable error) {
XCTAssertTrue([NSThread isMainThread]);
XCTAssertEqual(error.code, FIRAuthErrorCodeWeakPassword);
[expectation fulfill];
@@ -1719,7 +1721,8 @@ static const NSTimeInterval kWaitInterval = .5;
[[FIRAuth auth] signOut:NULL];
[[FIRAuth auth] createUserWithEmail:@""
password:kFakePassword
- completion:^(FIRUser *_Nullable user, NSError *_Nullable error) {
+ completion:^(FIRAuthDataResult *_Nullable result,
+ NSError *_Nullable error) {
XCTAssertTrue([NSThread isMainThread]);
XCTAssertEqual(error.code, FIRAuthErrorCodeMissingEmail);
[expectation fulfill];