diff options
author | Zsika Phillip <protocol86@users.noreply.github.com> | 2017-08-25 14:37:36 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-25 14:37:36 -0700 |
commit | 2a22a88141174199204356cb04fc51948ff57e5e (patch) | |
tree | ae1bf0a9612ab4d81d705c3f93c7d6312e3cef94 /Example/Auth | |
parent | f70eee41f921b4e67d2a0c75d19f0c5063ca1e8f (diff) |
fixes request URL (#218)
Diffstat (limited to 'Example/Auth')
-rw-r--r-- | Example/Auth/Tests/FIRGetProjectConfigRequestTests.m | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Example/Auth/Tests/FIRGetProjectConfigRequestTests.m b/Example/Auth/Tests/FIRGetProjectConfigRequestTests.m index 4c163e8..82f854e 100644 --- a/Example/Auth/Tests/FIRGetProjectConfigRequestTests.m +++ b/Example/Auth/Tests/FIRGetProjectConfigRequestTests.m @@ -21,11 +21,26 @@ #import "FIRGetProjectConfigResponse.h" #import "FIRFakeBackendRPCIssuer.h" +/** @var kGetProjectConfigEndPoint + @brief The "getProjectConfig" endpoint. + */ +static NSString *const kGetProjectConfigEndPoint = @"getProjectConfig"; + /** @var kTestAPIKey @brief Fake API key used for testing. */ static NSString *const kTestAPIKey = @"APIKey"; +/** @var kAPIURLFormat + @brief URL format for server API calls. + */ +static NSString *const kAPIURLFormat = @"https://%@/identitytoolkit/v3/relyingparty/%@?key=%@"; + +/** @var gAPIHost + @brief Host for server API calls. + */ +static NSString *gAPIHost = @"www.googleapis.com"; + @interface FIRGetProjectConfigRequestTests : XCTestCase @end @@ -68,6 +83,11 @@ static NSString *const kTestAPIKey = @"APIKey"; XCTAssertFalse([request containsPostBody]); // Confirm that the quest has no decoded body as it is get request. XCTAssertNil(_RPCIssuer.decodedRequest); + NSString *URLString = [NSString stringWithFormat:kAPIURLFormat, + gAPIHost, + kGetProjectConfigEndPoint, + kTestAPIKey]; + XCTAssertTrue([URLString isEqualToString:[request requestURL]]); } @end |