@@ -143,7 +143,9 @@ - (void) testStandardBlackList {
143143 callback: [OCMArg any ]]
144144 ).andDo (^(NSInvocation *invocation) {
145145 __unsafe_unretained NSDictionary *dictionary = nil ;
146+ __unsafe_unretained NSString *url = nil ;
146147 [invocation getArgument: &dictionary atIndex: 2 ];
148+ [invocation getArgument: &url atIndex: 3 ];
147149
148150 NSLog (@" d: %@ " , dictionary);
149151 NSString * link = dictionary[@" external_intent_uri" ];
@@ -153,6 +155,10 @@ - (void) testStandardBlackList {
153155 if ([link isEqualToString: pattern1] || [link isEqualToString: pattern2]) {
154156 [expectation fulfill ];
155157 }
158+ else
159+ if ([url bnc_containsString: @" install" ]) {
160+ [expectation fulfill ];
161+ }
156162 });
157163 [branch clearNetworkQueue ];
158164 [branch handleDeepLinkWithNewSession: [NSURL URLWithString: @" https://myapp.app.link/bob/link?oauth=true" ]];
@@ -183,13 +189,15 @@ - (void) testUserBlackList {
183189 [invocation getArgument: &dictionary atIndex: 2 ];
184190 [invocation getArgument: &URL atIndex: 3 ];
185191
186- if ([URL bnc_containsString: @" open" ] || [URL bnc_containsString: @" install" ]) {
187- NSString * link = dictionary[@" external_intent_uri" ];
188- NSString *pattern = @" \\ /bob\\ /" ;
189- NSLog (@" \n URL: '%@ '\n Link: '%@ '\n Pattern: '%@ '\n ." , URL, link, pattern);
190- if ([link isEqualToString: pattern]) {
191- [expectation fulfill ];
192- }
192+ NSString * link = dictionary[@" external_intent_uri" ];
193+ NSString *pattern = @" \\ /bob\\ /" ;
194+ NSLog (@" \n URL: '%@ '\n Link: '%@ '\n Pattern: '%@ '\n ." , URL, link, pattern);
195+ if ([link isEqualToString: pattern]) {
196+ [expectation fulfill ];
197+ }
198+ else
199+ if ([URL bnc_containsString: @" install" ]) {
200+ [expectation fulfill ];
193201 }
194202 });
195203 [branch handleDeepLinkWithNewSession: [NSURL URLWithString: @" https://myapp.app.link/bob/link" ]];
0 commit comments