diff --git a/AWSPinpointTests/AWSPinpointTargetingClientTests.m b/AWSPinpointTests/AWSPinpointTargetingClientTests.m index 0ad6bd3d3e4..12793ed4c4b 100644 --- a/AWSPinpointTests/AWSPinpointTargetingClientTests.m +++ b/AWSPinpointTests/AWSPinpointTargetingClientTests.m @@ -33,7 +33,7 @@ @interface AWSPinpointTargetingClientTests : XCTestCase @property (nonatomic, strong) AWSPinpoint *pinpoint; @property (nonatomic, strong) AWSPinpointConfiguration *configuration; -@property (nonatomic, strong) UIApplication *application; +@property (nonatomic, strong) id mockApplication; @property (nonatomic, strong) NSUserDefaults *userDefaults; @property (nonatomic, strong) AWSUICKeyChainStore *keychain; @@ -72,6 +72,7 @@ - (void)setUp { } - (void)tearDown { + [self.mockApplication stopMocking]; [super tearDown]; } @@ -122,6 +123,7 @@ - (void)initializeMockApplicationWithRemoteNotifications:(BOOL)withRemoteNotific UIUserNotificationSettings *notificationSettings = [UIUserNotificationSettings settingsForTypes:notificationType categories:nil]; OCMStub([mockApplication currentUserNotificationSettings]).andReturn(notificationSettings); OCMStub([mockApplication isRegisteredForRemoteNotifications]).andReturn(withRemoteNotifications); + self.mockApplication = mockApplication; } - (void)testConstructors {