Skip to content

Commit c5bad0e

Browse files
committed
Add setCodePushVersion test on iOS
1 parent bcc4a51 commit c5bad0e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

example/ios/InstabugSampleTests/InstabugSampleTests.m

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,18 +62,20 @@ - (void)testSetEnabled {
6262
}
6363

6464
- (void)testInit {
65-
id<InstabugCPTestProtocol> mock = OCMClassMock([Instabug class]);
65+
id mock = OCMClassMock([Instabug class]);
6666
IBGInvocationEvent floatingButtonInvocationEvent = IBGInvocationEventFloatingButton;
6767
NSString *appToken = @"app_token";
6868
NSArray *invocationEvents = [NSArray arrayWithObjects:[NSNumber numberWithInteger:floatingButtonInvocationEvent], nil];
69+
NSString *codePushLabel = @"v123";
6970
IBGSDKDebugLogsLevel sdkDebugLogsLevel = IBGSDKDebugLogsLevelDebug;
7071

7172
XCTestExpectation *expectation = [self expectationWithDescription:@"Testing [Instabug init]"];
7273

7374
OCMStub([mock startWithToken:appToken invocationEvents:floatingButtonInvocationEvent]);
74-
[self.instabugBridge init:appToken invocationEvents:invocationEvents debugLogsLevel:sdkDebugLogsLevel];
75+
[self.instabugBridge init:appToken invocationEvents:invocationEvents codePushLabel:codePushLabel debugLogsLevel:sdkDebugLogsLevel];
7576

7677
[[NSRunLoop mainRunLoop] performBlock:^{
78+
OCMVerify([mock setCodePushVersion:codePushLabel]);
7779
OCMVerify([mock startWithToken:appToken invocationEvents:floatingButtonInvocationEvent]);
7880
[expectation fulfill];
7981
}];

0 commit comments

Comments
 (0)