Skip to content

Commit 5552f69

Browse files
committed
Unit tests for notification open forwarding to legacy selector
Cherry picked from #1131
1 parent 8ce71d8 commit 5552f69

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

iOS_SDK/OneSignalSDK/UnitTests/UIApplicationDelegateSwizzlingTests.m

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,7 @@ - (UNNotificationResponse*)createOneSignalNotificationResponse {
566566
id userInfo = @{@"custom":
567567
@{ @"i": @"b2f7f966-d8cc-11e4-bed1-df8f05be55ba" }
568568
};
569-
569+
570570
return [UnitTestCommonMethods createBasiciOSNotificationResponseWithPayload:userInfo];
571571
}
572572

@@ -575,7 +575,6 @@ - (UNNotificationResponse*)createNonOneSignalNotificationResponse {
575575
}
576576

577577
- (void)testNotificationOpenForwardsToLegacySelector {
578-
579578
AppDelegateForExistingSelectorsTest* myAppDelegate = [AppDelegateForExistingSelectorsTest new];
580579
UIApplication.sharedApplication.delegate = myAppDelegate;
581580

@@ -590,9 +589,7 @@ - (void)testNotificationOpenForwardsToLegacySelector {
590589
)
591590
]);
592591
XCTAssertEqual([OneSignalAppDelegateOverrider callCountForSelector:@"oneSignalReceiveRemoteNotification:UserInfo:fetchCompletionHandler:"], 1);
593-
594-
595-
592+
596593
notifResponse = [self createNonOneSignalNotificationResponse];
597594
notifCenter = [UNUserNotificationCenter currentNotificationCenter];
598595
notifCenterDelegate = notifCenter.delegate;
@@ -604,7 +601,6 @@ - (void)testNotificationOpenForwardsToLegacySelector {
604601
)
605602
]);
606603
XCTAssertEqual([OneSignalAppDelegateOverrider callCountForSelector:@"oneSignalReceiveRemoteNotification:UserInfo:fetchCompletionHandler:"], 2);
607-
608604
}
609605

610606
- (void)testAppDelegateInheritsFromBaseMissingSelectors {

0 commit comments

Comments
 (0)