Skip to content

Commit 45b1974

Browse files
authored
Merge pull request #1090 from OneSignal/test/fix_iam_test_carryover
[Tests] Fix IAM test carryover
2 parents 8b41a8f + 7752928 commit 45b1974

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

iOS_SDK/OneSignalSDK/UnitTests/InAppMessagingTests.m

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ of this software and associated documentation files (the "Software"), to deal
4444
#import "OSInAppMessageAction.h"
4545
#import "OSInAppMessageBridgeEvent.h"
4646
#import "UIDeviceOverrider.h"
47+
#import "OSMessagingControllerOverrider.h"
4748

4849
/*
4950
Test to make sure that OSInAppMessage correctly implements
@@ -122,6 +123,15 @@ - (void)setUp {
122123
*/
123124
- (void)tearDown {
124125
[super tearDown];
126+
[UnitTestCommonMethods runBackgroundThreads];
127+
[OneSignal setInAppMessageClickHandler:nil];
128+
[OneSignal pauseInAppMessages:true];
129+
130+
OneSignalOverrider.shouldOverrideSessionLaunchTime = false;
131+
132+
[OSMessagingController.sharedInstance resetState];
133+
134+
NSTimerOverrider.shouldScheduleTimers = true;
125135
}
126136

127137
-(void)testIphoneSimulator {

0 commit comments

Comments
 (0)