@@ -198,7 +198,8 @@ - (void)testSubscribeWithNoTopicPrefix {
198
198
NSString *topicNameWithPrefix = [FIRMessagingPubSub addPrefixToTopic: topicName];
199
199
messaging.pubsub = mockPubSub;
200
200
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 ]]);
202
203
[messaging subscribeToTopic: topicName];
203
204
OCMVerifyAll (mockPubSub);
204
205
// 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 {
213
214
NSString *topicName = @" /topics/topicWithoutPrefix" ;
214
215
messaging.pubsub = mockPubSub;
215
216
messaging.defaultFcmToken = @" fake-default-token" ;
216
- OCMExpect ([messaging.pubsub subscribeToTopic: [OCMArg isEqual: topicName]]);
217
+ OCMExpect ([messaging.pubsub subscribeToTopic: [OCMArg isEqual: topicName] handler: [OCMArg any ] ]);
217
218
[messaging subscribeToTopic: topicName];
218
219
OCMVerifyAll (mockPubSub);
219
220
// 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 {
229
230
NSString *topicNameWithPrefix = [FIRMessagingPubSub addPrefixToTopic: topicName];
230
231
messaging.pubsub = mockPubSub;
231
232
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 ]]);
233
235
[messaging unsubscribeFromTopic: topicName];
234
236
OCMVerifyAll (mockPubSub);
235
237
// 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 {
244
246
NSString *topicName = @" /topics/topicWithPrefix" ;
245
247
messaging.pubsub = mockPubSub;
246
248
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 ]]);
248
251
[messaging unsubscribeFromTopic: topicName];
249
252
OCMVerifyAll (mockPubSub);
250
253
// Need to swap back since it's a singleton and hence will live beyond the scope of this test.
0 commit comments