File tree Expand file tree Collapse file tree 2 files changed +39
-0
lines changed
InstabugSample/ios/InstabugSampleTests Expand file tree Collapse file tree 2 files changed +39
-0
lines changed Original file line number Diff line number Diff line change @@ -528,5 +528,35 @@ - (void)testSetCrashReportingEnabled {
528
528
XCTAssertFalse (IBGCrashReporting.enabled );
529
529
}
530
530
531
+ /*
532
+ +------------------------------------------------------------------------+
533
+ | Chats Module |
534
+ +------------------------------------------------------------------------+
535
+ */
536
+
537
+ - (void )testSetChatsEnabled {
538
+ id mock = OCMClassMock ([Instabug class ]);
539
+
540
+ [self .instabugBridge setChatsEnabled: YES ];
541
+ XCTAssertTrue (IBGChats.enabled );
542
+
543
+ [self .instabugBridge setChatsEnabled: NO ];
544
+ XCTAssertFalse (IBGChats.enabled );
545
+ }
546
+
547
+ - (void )testShowChats {
548
+ id mock = OCMClassMock ([IBGChats class ]);
549
+ XCTestExpectation *expectation = [self expectationWithDescription: @" Testing [IBGChats showChats]" ];
550
+
551
+ OCMStub ([mock show ]);
552
+ [self .instabugBridge showChats ];
553
+
554
+ [[NSRunLoop mainRunLoop ] performBlock: ^{
555
+ OCMVerify ([mock show ]);
556
+ [expectation fulfill ];
557
+ }];
558
+
559
+ [self waitForExpectationsWithTimeout: EXPECTATION_TIMEOUT handler: nil ];
560
+ }
531
561
532
562
@end
Original file line number Diff line number Diff line change 126
126
127
127
- (void )setCrashReportingEnabled : (BOOL )enabledCrashReporter ;
128
128
129
+ /*
130
+ +------------------------------------------------------------------------+
131
+ | Chats Module |
132
+ +------------------------------------------------------------------------+
133
+ */
134
+
135
+ - (void )setChatsEnabled : (BOOL )isEnabled ;
136
+ - (void )showChats ;
137
+
129
138
@end
You can’t perform that action at this time.
0 commit comments