Skip to content

Commit f4946f5

Browse files
committed
Updated shortUrl test
1 parent 70d3d39 commit f4946f5

File tree

1 file changed

+4
-17
lines changed

1 file changed

+4
-17
lines changed

Branch-TestBed/Branch-SDK-Tests/BranchClassTests.m

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -200,23 +200,10 @@ - (void)testGetLatestReferringBranchLinkProperties_ClickedBranchLink {
200200
XCTAssertEqualObjects(result.campaign, @"latest campaign");
201201
}
202202

203-
- (void)testGetShortURL {
204-
XCTestExpectation *expectation = [self expectationWithDescription:@"Fetching URL"];
205-
206-
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
207-
NSString *shortURL = [self.branch getShortURL];
208-
209-
XCTAssertNotNil(shortURL, @"URL should not be nil");
210-
XCTAssertTrue([shortURL hasPrefix:@"https://"], @"URL should start with 'https://'");
211-
212-
[expectation fulfill];
213-
});
214-
215-
[self waitForExpectationsWithTimeout:10 handler:^(NSError *error) {
216-
if (error) {
217-
NSLog(@"Timeout Error: %@", error);
218-
}
219-
}];
203+
- (void)testGetShortURL {
204+
NSString *shortURL = [self.branch getShortURL];
205+
XCTAssertNotNil(shortURL, @"URL should not be nil");
206+
XCTAssertTrue([shortURL hasPrefix:@"https://"], @"URL should start with 'https://'");
220207
}
221208

222209
- (void)testGetLongURLWithParamsAndChannelAndTagsAndFeatureAndStageAndAlias {

0 commit comments

Comments
 (0)