Skip to content

Commit d275868

Browse files
authored
Merge pull request #3828 from Crebs/@W-17736613
@W-17736613 - add back unit test
2 parents 6b729d7 + 959f555 commit d275868

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

libs/SalesforceSDKCore/SalesforceSDKCoreTests/SalesforceRestAPITests.m

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2894,13 +2894,18 @@ - (void)testRestApiGlobalInstance {
28942894
XCTAssertTrue(globalInstance != sharedInstance, @"SFRestAPI globalInstance and sharedInstance must be different");
28952895
}
28962896

2897-
// TODO: Add back after fixing Flappiness
2898-
- (void)_testPublicApiCalls {
2897+
- (void)testPublicApiCalls {
28992898
XCTestExpectation *getExpectation = [self expectationWithDescription:@"Get"];
29002899
__block NSError *error = nil;
29012900
__block NSDictionary *response = nil;
2902-
SFRestRequest *request = [SFRestRequest customUrlRequestWithMethod:SFRestMethodGET baseURL:@"https://api.github.com" path:@"/orgs/forcedotcom/repos" queryParams:nil];
2903-
XCTAssertEqual(request.baseURL, @"https://api.github.com", @"Base URL should match");
2901+
NSString *testBaseURL = @"https://mobilesdk.my.salesforce.com";
2902+
NSString *testPathURL = @"/.well-known/auth-configuration";
2903+
SFRestRequest *request = [SFRestRequest customUrlRequestWithMethod:SFRestMethodGET
2904+
baseURL:testBaseURL
2905+
path:testPathURL
2906+
queryParams:nil];
2907+
XCTAssertEqual(request.baseURL, testBaseURL, @"Base URL should match");
2908+
XCTAssertEqual(request.path, testPathURL, @"Path URL should match");
29042909
[[SFRestAPI sharedGlobalInstance] sendRequest:request failureBlock:^(id resp, NSError *e, NSURLResponse *rawResponse) {
29052910
error = e;
29062911
[getExpectation fulfill];

0 commit comments

Comments
 (0)