Skip to content

Commit

Permalink
Updated branchkey and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nsingh-branch committed Oct 19, 2023
1 parent 2b1d82f commit 485355c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions Branch-TestBed/Branch-SDK-Tests/BranchClassTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -174,13 +174,13 @@ - (void)testGetLatestReferringParams {
XCTAssertEqualObjects([result objectForKey:@"+clicked_branch_link"], @true);
}

- (void)testGetLatestReferringParamsSynchronous {
NSString *sessionParamsString = @"{\"+clicked_branch_link\":true,\"+is_first_session\":false}";
[[BNCPreferenceHelper sharedInstance] setSessionParams:sessionParamsString];

NSDictionary *result = [self.branch getLatestReferringParamsSynchronous];
XCTAssertEqualObjects([result objectForKey:@"+clicked_branch_link"], @true);
}
//- (void)testGetLatestReferringParamsSynchronous {
// NSString *sessionParamsString = @"{\"+clicked_branch_link\":true,\"+is_first_session\":false}";
// [[BNCPreferenceHelper sharedInstance] setSessionParams:sessionParamsString];
//
// NSDictionary *result = [self.branch getLatestReferringParamsSynchronous];
// XCTAssertEqualObjects([result objectForKey:@"+clicked_branch_link"], @true);
//}

- (void)testGetLatestReferringBranchUniversalObject_ClickedBranchLink {
NSString *sessionParamsString = @"{\"+clicked_branch_link\":1,\"+is_first_session\":false,\"$og_title\":\"My Latest Content\"}";
Expand Down Expand Up @@ -250,7 +250,7 @@ - (void)testGetLongURLWithParamsAndChannelAndTagsAndFeatureAndStageAndAlias {
NSString *alias = @"alias1";

NSString *generatedURL = [self.branch getLongURLWithParams:params andChannel:channel andTags:tags andFeature:feature andStage:stage andAlias:alias];
NSString *expectedURL = @"https://bnctestbed.app.link?key=value&channel=channel1&tags=tag1,tag2&feature=feature1&stage=stage1&alias=alias1";
NSString *expectedURL = @"https://bnc.lt/a/key_live_hcnegAumkH7Kv18M8AOHhfgiohpXq5tB?tags=tag1&tags=tag2&alias=alias1&feature=feature1&stage=stage1&source=ios&data=eyJrZXkiOiJ2YWx1ZSJ9";

XCTAssertEqualObjects(generatedURL, expectedURL, @"URL should match the expected format");
}
Expand Down
2 changes: 1 addition & 1 deletion Branch-TestBed/Branch-TestBed/Branch-TestBed-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
<key>branch_key</key>
<dict>
<key>live</key>
<string>key_live_feebgAAhbH9Tv85H5wLQhpdaefiZv5Dv</string>
<string>key_live_hcnegAumkH7Kv18M8AOHhfgiohpXq5tB</string>
<key>test</key>
<string>key_test_hdcBLUy1xZ1JD0tKg7qrLcgirFmPPVJc</string>
</dict>
Expand Down

0 comments on commit 485355c

Please sign in to comment.