From cfd8118355dd63e666e51a3ba532e8a25393a99c Mon Sep 17 00:00:00 2001 From: Paul Beusterien Date: Fri, 3 Nov 2017 12:28:03 -0700 Subject: Update messaging test for upcoming InstanceID changes (#425) --- Example/Messaging/Tests/FIRMessagingServiceTest.m | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/Example/Messaging/Tests/FIRMessagingServiceTest.m b/Example/Messaging/Tests/FIRMessagingServiceTest.m index b3dce57..c2b0853 100644 --- a/Example/Messaging/Tests/FIRMessagingServiceTest.m +++ b/Example/Messaging/Tests/FIRMessagingServiceTest.m @@ -139,19 +139,21 @@ }]; } -- (void)testSubscribeWithInvalidToken { +// TODO(chliangGoogle) Investigate why invalid token can't throw assertion but the rest can under +// release build. +- (void)testSubscribeWithInvalidTopic { FIRMessaging *messaging = [FIRMessaging messaging]; XCTestExpectation *exceptionExpectation = - [self expectationWithDescription:@"Should throw exception for invalid token"]; + [self expectationWithDescription:@"Should throw exception for invalid token"]; @try { - [messaging.pubsub subscribeWithToken:@"" - topic:@"/topics/hello-world" + [messaging.pubsub subscribeWithToken:@"abcdef1234" + topic:nil options:nil handler: - ^(FIRMessagingTopicOperationResult result, NSError *error) { - XCTFail(@"Should not invoke the handler"); - }]; + ^(FIRMessagingTopicOperationResult result, NSError *error) { + XCTFail(@"Should not invoke the handler"); + }]; } @catch (NSException *exception) { [exceptionExpectation fulfill]; -- cgit v1.2.3