diff options
author | Paul Beusterien <paulbeusterien@google.com> | 2017-11-03 12:28:03 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-03 12:28:03 -0700 |
commit | cfd8118355dd63e666e51a3ba532e8a25393a99c (patch) | |
tree | fa86d40221d25b5a1561711fb403d177963c5e61 /Example | |
parent | f9b2f91da109d2b74f7076e8b6b6d8ced73a5e27 (diff) |
Update messaging test for upcoming InstanceID changes (#425)
Diffstat (limited to 'Example')
-rw-r--r-- | Example/Messaging/Tests/FIRMessagingServiceTest.m | 16 |
1 files 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]; |