aboutsummaryrefslogtreecommitdiffhomepage
path: root/Example/Auth/Tests/FIRSetAccountInfoRequestTests.m
diff options
context:
space:
mode:
Diffstat (limited to 'Example/Auth/Tests/FIRSetAccountInfoRequestTests.m')
-rw-r--r--Example/Auth/Tests/FIRSetAccountInfoRequestTests.m13
1 files changed, 11 insertions, 2 deletions
diff --git a/Example/Auth/Tests/FIRSetAccountInfoRequestTests.m b/Example/Auth/Tests/FIRSetAccountInfoRequestTests.m
index 54d8ff0..4301fa1 100644
--- a/Example/Auth/Tests/FIRSetAccountInfoRequestTests.m
+++ b/Example/Auth/Tests/FIRSetAccountInfoRequestTests.m
@@ -190,6 +190,11 @@ static NSString *const kExpectedAPIURL =
In the @c setUp method we initialize this and set @c FIRAuthBackend's RPC issuer to it.
*/
FIRFakeBackendRPCIssuer *_RPCIssuer;
+
+ /** @var _requestConfiguration
+ @brief This is the request configuration used for testing.
+ */
+ FIRAuthRequestConfiguration *_requestConfiguration;
}
- (void)setUp {
@@ -197,10 +202,12 @@ static NSString *const kExpectedAPIURL =
FIRFakeBackendRPCIssuer *RPCIssuer = [[FIRFakeBackendRPCIssuer alloc] init];
[FIRAuthBackend setDefaultBackendImplementationWithRPCIssuer:RPCIssuer];
_RPCIssuer = RPCIssuer;
+ _requestConfiguration = [[FIRAuthRequestConfiguration alloc] initWithAPIKey:kTestAPIKey];
}
- (void)tearDown {
_RPCIssuer = nil;
+ _requestConfiguration = nil;
[FIRAuthBackend setDefaultBackendImplementationWithRPCIssuer:nil];
[super tearDown];
}
@@ -209,7 +216,8 @@ static NSString *const kExpectedAPIURL =
@brief Tests the set account info request.
*/
- (void)testSetAccountInfoRequest {
- FIRSetAccountInfoRequest *request = [[FIRSetAccountInfoRequest alloc] initWithAPIKey:kTestAPIKey];
+ FIRSetAccountInfoRequest *request =
+ [[FIRSetAccountInfoRequest alloc] initWithRequestConfiguration:_requestConfiguration];
request.returnSecureToken = NO;
[FIRAuthBackend setAccountInfo:request
callback:^(FIRSetAccountInfoResponse *_Nullable response,
@@ -240,7 +248,8 @@ static NSString *const kExpectedAPIURL =
@brief Tests the set account info request with optional fields.
*/
- (void)testSetAccountInfoRequestOptionalFields {
- FIRSetAccountInfoRequest *request = [[FIRSetAccountInfoRequest alloc] initWithAPIKey:kTestAPIKey];
+ FIRSetAccountInfoRequest *request =
+ [[FIRSetAccountInfoRequest alloc] initWithRequestConfiguration:_requestConfiguration];
request.accessToken = kTestAccessToken;
request.displayName = kTestDisplayName;
request.localID = kTestLocalID;