File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
example/ios/InstabugSampleTests Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -72,13 +72,17 @@ - (void) testgivenHandler$setOnInvokeHandler_whenQuery_thenShouldCallNativeApi {
72
72
73
73
- (void ) testgivenHandlerCANCEL $setOnDismissHandler_whenQuery_thenShouldCallNativeApi {
74
74
id partialMock = OCMPartialMock (self.instabugBridge );
75
+ IBGDismissType dismissType = IBGDismissTypeCancel;
76
+ IBGReportType reportType = IBGReportTypeBug;
77
+
75
78
RCTResponseSenderBlock callback = ^(NSArray *response) {};
76
79
[partialMock setOnDismissHandler: callback];
77
80
XCTAssertNotNil (IBGBugReporting.didDismissHandler );
78
- NSDictionary *result = @{ @" dismissType" : @" CANCEL" ,
79
- @" reportType" : @" bug" };
81
+ NSDictionary *result = @{ @" dismissType" : @(dismissType),
82
+ @" reportType" : @(reportType)};
83
+
80
84
OCMStub ([partialMock sendEventWithName: @" IBGpostInvocationHandler" body: result]);
81
- IBGBugReporting.didDismissHandler (IBGDismissTypeCancel,IBGReportTypeBug );
85
+ IBGBugReporting.didDismissHandler (dismissType, reportType );
82
86
OCMVerify ([partialMock sendEventWithName: @" IBGpostInvocationHandler" body: result]);
83
87
}
84
88
You can’t perform that action at this time.
0 commit comments