@@ -413,8 +413,7 @@ - (void)testItShouldNotSubscribeToChannelAndReceiveAccessDeniedEventWhenPAMKeysU
413
413
withBlock: ^(PubNub *client, PNSubscribeStatus *status, BOOL *remove) {
414
414
415
415
if (status.operation == PNSubscribeOperation && status.category == PNAccessDeniedCategory) {
416
- XCTAssertTrue (status.willAutomaticallyRetry );
417
- [status cancelAutomaticRetry ];
416
+ XCTAssertFalse (status.willAutomaticallyRetry );
418
417
419
418
*remove = YES ;
420
419
@@ -426,32 +425,6 @@ - (void)testItShouldNotSubscribeToChannelAndReceiveAccessDeniedEventWhenPAMKeysU
426
425
}];
427
426
}
428
427
429
- - (void )testItShouldNotSubscribeToChannelAndRetryWhenReceiveAccessDeniedEvent {
430
- NSString *channel = [self channelWithName: @" test-channel1" ];
431
- __block NSUInteger retriedCount = 0 ;
432
-
433
-
434
- [self waitToCompleteIn: self .testCompletionDelay codeBlock: ^(dispatch_block_t handler) {
435
- [self addStatusHandlerForClient: self .client
436
- withBlock: ^(PubNub *client, PNSubscribeStatus *status, BOOL *remove) {
437
-
438
- if (status.operation == PNSubscribeOperation && status.category == PNAccessDeniedCategory) {
439
- XCTAssertTrue (status.willAutomaticallyRetry );
440
-
441
- if (retriedCount == 1 ) {
442
- [status cancelAutomaticRetry ];
443
- *remove = YES ;
444
- handler ();
445
- } else {
446
- retriedCount++;
447
- }
448
- }
449
- }];
450
-
451
- [self .client subscribeToChannels: @[channel] withPresence: NO ];
452
- }];
453
- }
454
-
455
428
456
429
#pragma mark - Tests :: Subscribe to channel group
457
430
@@ -791,8 +764,7 @@ - (void)testItShouldNotSubscribeToChannelGroupAndReceiveAccessDeniedEventWhenPAM
791
764
withBlock: ^(PubNub *client, PNSubscribeStatus *status, BOOL *remove) {
792
765
793
766
if (status.operation == PNSubscribeOperation && status.category == PNAccessDeniedCategory) {
794
- XCTAssertTrue (status.willAutomaticallyRetry );
795
- [status cancelAutomaticRetry ];
767
+ XCTAssertFalse (status.willAutomaticallyRetry );
796
768
797
769
*remove = YES ;
798
770
@@ -804,31 +776,6 @@ - (void)testItShouldNotSubscribeToChannelGroupAndReceiveAccessDeniedEventWhenPAM
804
776
}];
805
777
}
806
778
807
- - (void )testItShouldNotSubscribeToChannelGroupAndRetryWhenReceiveAccessDeniedEvent {
808
- NSString *channelGroup = [self channelGroupWithName: @" test-channel-group1" ];
809
- __block NSUInteger retriedCount = 0 ;
810
-
811
-
812
- [self waitToCompleteIn: self .testCompletionDelay codeBlock: ^(dispatch_block_t handler) {
813
- [self addStatusHandlerForClient: self .client
814
- withBlock: ^(PubNub *client, PNSubscribeStatus *status, BOOL *remove) {
815
-
816
- if (status.operation == PNSubscribeOperation && status.category == PNAccessDeniedCategory) {
817
- XCTAssertTrue (status.willAutomaticallyRetry );
818
-
819
- if (retriedCount == 1 ) {
820
- [status cancelAutomaticRetry ];
821
- *remove = YES ;
822
- handler ();
823
- } else {
824
- retriedCount++;
825
- }
826
- }
827
- }];
828
-
829
- [self .client subscribeToChannelGroups: @[channelGroup] withPresence: NO ];
830
- }];
831
- }
832
779
833
780
834
781
#pragma mark - Tests :: Builder pattern-based subscribe
0 commit comments