Skip to content

Commit c4aacaa

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

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

example/ios/InstabugSampleTests/InstabugSampleTests.m

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,13 @@ - (void)testInit {
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:^{
7778
OCMVerify([mock startWithToken:appToken invocationEvents:floatingButtonInvocationEvent]);
@@ -218,6 +219,15 @@ - (void)testSetReproStepsMode {
218219
OCMVerify([mock setReproStepsMode:reproStepsMode]);
219220
}
220221

222+
- (void)testSetCodePushVersion {
223+
id mock = OCMClassMock([Instabug class]);
224+
NSString *codePushLabel = @"v123";
225+
226+
OCMStub([mock setCodePushVersion:codePushLabel]);
227+
[self.instabugBridge setCodePushVersion:codePushLabel];
228+
OCMVerify([mock setCodePushVersion:codePushLabel]);
229+
}
230+
221231
- (void)testSetSdkDebugLogsLevel {
222232
id mock = OCMClassMock([Instabug class]);
223233
IBGSDKDebugLogsLevel sdkDebugLogsLevel = IBGSDKDebugLogsLevelVerbose;

0 commit comments

Comments
 (0)