Skip to content

Commit 4e4c82b

Browse files
author
Oleksiy Ivanov
committed
Fix tests.
1 parent 799a808 commit 4e4c82b

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

Example/Messaging/Tests/FIRMessagingServiceTest.m

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,8 @@ - (void)testSubscribeWithNoTopicPrefix {
198198
NSString *topicNameWithPrefix = [FIRMessagingPubSub addPrefixToTopic:topicName];
199199
messaging.pubsub = mockPubSub;
200200
messaging.defaultFcmToken = @"fake-default-token";
201-
OCMExpect([messaging.pubsub subscribeToTopic:[OCMArg isEqual:topicNameWithPrefix]]);
201+
OCMExpect([messaging.pubsub subscribeToTopic:[OCMArg isEqual:topicNameWithPrefix]
202+
handler:[OCMArg any]]);
202203
[messaging subscribeToTopic:topicName];
203204
OCMVerifyAll(mockPubSub);
204205
// Need to swap back since it's a singleton and hence will live beyond the scope of this test.
@@ -213,7 +214,7 @@ - (void)testSubscribeWithTopicPrefix {
213214
NSString *topicName = @"/topics/topicWithoutPrefix";
214215
messaging.pubsub = mockPubSub;
215216
messaging.defaultFcmToken = @"fake-default-token";
216-
OCMExpect([messaging.pubsub subscribeToTopic:[OCMArg isEqual:topicName]]);
217+
OCMExpect([messaging.pubsub subscribeToTopic:[OCMArg isEqual:topicName] handler:[OCMArg any]]);
217218
[messaging subscribeToTopic:topicName];
218219
OCMVerifyAll(mockPubSub);
219220
// Need to swap back since it's a singleton and hence will live beyond the scope of this test.
@@ -229,7 +230,8 @@ - (void)testUnsubscribeWithNoTopicPrefix {
229230
NSString *topicNameWithPrefix = [FIRMessagingPubSub addPrefixToTopic:topicName];
230231
messaging.pubsub = mockPubSub;
231232
messaging.defaultFcmToken = @"fake-default-token";
232-
OCMExpect([messaging.pubsub unsubscribeFromTopic:[OCMArg isEqual:topicNameWithPrefix]]);
233+
OCMExpect([messaging.pubsub unsubscribeFromTopic:[OCMArg isEqual:topicNameWithPrefix]
234+
handler:[OCMArg any]]);
233235
[messaging unsubscribeFromTopic:topicName];
234236
OCMVerifyAll(mockPubSub);
235237
// Need to swap back since it's a singleton and hence will live beyond the scope of this test.
@@ -244,7 +246,8 @@ - (void)testUnsubscribeWithTopicPrefix {
244246
NSString *topicName = @"/topics/topicWithPrefix";
245247
messaging.pubsub = mockPubSub;
246248
messaging.defaultFcmToken = @"fake-default-token";
247-
OCMExpect([messaging.pubsub unsubscribeFromTopic:[OCMArg isEqual:topicName]]);
249+
OCMExpect([messaging.pubsub unsubscribeFromTopic:[OCMArg isEqual:topicName]
250+
handler:[OCMArg any]]);
248251
[messaging unsubscribeFromTopic:topicName];
249252
OCMVerifyAll(mockPubSub);
250253
// Need to swap back since it's a singleton and hence will live beyond the scope of this test.

0 commit comments

Comments
 (0)