diff options
Diffstat (limited to 'Example')
-rw-r--r-- | Example/Messaging/Tests/FIRMessagingRemoteNotificationsProxyTest.m | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Example/Messaging/Tests/FIRMessagingRemoteNotificationsProxyTest.m b/Example/Messaging/Tests/FIRMessagingRemoteNotificationsProxyTest.m index 3453f11..6c7fcec 100644 --- a/Example/Messaging/Tests/FIRMessagingRemoteNotificationsProxyTest.m +++ b/Example/Messaging/Tests/FIRMessagingRemoteNotificationsProxyTest.m @@ -164,12 +164,14 @@ void FCM_swizzle_didReceiveNotificationResponseWithHandler( - (void)testSwizzledIncompleteAppDelegateRemoteNotificationMethod { IncompleteAppDelegate *incompleteAppDelegate = [[IncompleteAppDelegate alloc] init]; [self.mockProxy swizzleAppDelegateMethods:incompleteAppDelegate]; +#ifdef BUG_1451 SEL selector = @selector(application:didReceiveRemoteNotification:); XCTAssertTrue([incompleteAppDelegate respondsToSelector:selector]); [incompleteAppDelegate application:OCMClassMock([UIApplication class]) didReceiveRemoteNotification:@{}]; // Verify our swizzled method was called OCMVerify(FCM_swizzle_appDidReceiveRemoteNotification); +#endif } // If the remote notification with fetch handler is NOT implemented, we will force-implement @@ -181,8 +183,10 @@ void FCM_swizzle_didReceiveNotificationResponseWithHandler( @selector(application:didReceiveRemoteNotification:fetchCompletionHandler:); XCTAssertFalse([incompleteAppDelegate respondsToSelector:remoteNotificationWithFetchHandler]); +#ifdef BUG_1451 SEL remoteNotification = @selector(application:didReceiveRemoteNotification:); XCTAssertTrue([incompleteAppDelegate respondsToSelector:remoteNotification]); +#endif } - (void)testSwizzledAppDelegateRemoteNotificationMethods { |