Skip to content

Commit ced701e

Browse files
committed
Fix iOS Test
1 parent 4b61ed9 commit ced701e

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

example/ios/InstabugSampleTests/InstabugBugReportingTests.m

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,17 @@ - (void) testgivenHandler$setOnInvokeHandler_whenQuery_thenShouldCallNativeApi {
7272

7373
- (void) testgivenHandlerCANCEL$setOnDismissHandler_whenQuery_thenShouldCallNativeApi {
7474
id partialMock = OCMPartialMock(self.instabugBridge);
75+
IBGDismissType dismissType = IBGDismissTypeCancel;
76+
IBGReportType reportType = IBGReportTypeBug;
77+
7578
RCTResponseSenderBlock callback = ^(NSArray *response) {};
7679
[partialMock setOnDismissHandler:callback];
7780
XCTAssertNotNil(IBGBugReporting.didDismissHandler);
78-
NSDictionary *result = @{ @"dismissType": @"CANCEL",
79-
@"reportType": @"bug"};
81+
NSDictionary *result = @{ @"dismissType": @(dismissType),
82+
@"reportType": @(reportType)};
83+
8084
OCMStub([partialMock sendEventWithName:@"IBGpostInvocationHandler" body:result]);
81-
IBGBugReporting.didDismissHandler(IBGDismissTypeCancel,IBGReportTypeBug);
85+
IBGBugReporting.didDismissHandler(dismissType, reportType);
8286
OCMVerify([partialMock sendEventWithName:@"IBGpostInvocationHandler" body:result]);
8387
}
8488

0 commit comments

Comments
 (0)