Skip to content

Commit

Permalink
Unit Test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Paweł Kania committed Sep 24, 2019
1 parent 5353fd9 commit e58bb37
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion PushNotificationSimulation.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

Pod::Spec.new do |spec|
spec.name = "PushNotificationSimulation"
spec.version = "1.1.0"
spec.version = "1.1.1"
spec.summary = "Helper in simulating push notifications"
spec.homepage = "https://github.com/pwlkania/PushNotificationSimulation"
spec.license = "MIT"
Expand Down
8 changes: 4 additions & 4 deletions PushNotificationSimulation.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 1.1.0;
MARKETING_VERSION = 1.1.1;
PRODUCT_BUNDLE_IDENTIFIER = com.PushNotificationSimulation;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SKIP_INSTALL = YES;
Expand All @@ -577,7 +577,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 1.1.0;
MARKETING_VERSION = 1.1.1;
PRODUCT_BUNDLE_IDENTIFIER = com.PushNotificationSimulation;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SKIP_INSTALL = YES;
Expand All @@ -598,7 +598,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.1.0;
MARKETING_VERSION = 1.1.1;
PRODUCT_BUNDLE_IDENTIFIER = com.PushNotificationSimulationExamples;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
Expand All @@ -618,7 +618,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.1.0;
MARKETING_VERSION = 1.1.1;
PRODUCT_BUNDLE_IDENTIFIER = com.PushNotificationSimulationExamples;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
//

import UIKit
import UserNotifications

// MARK: - PushNotificationSimulation

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,12 @@ class AppDelegateMock: AppDelegate {
// MARK: Overridden methods

override func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) {
super.application(application, didReceiveRemoteNotification: userInfo, fetchCompletionHandler: completionHandler)
pushCallback?(userInfo)
}

override func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
super.application(application, didRegisterForRemoteNotificationsWithDeviceToken: deviceToken)
deviceTokenCallback?(deviceToken)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ class PushNotificationSimulationExamplesTests: XCTestCase {
XCTAssertTrue(UIApplication.shared.delegate === appDelegate)

// You can even test breakpoints. To do so, comment line below and enable near breakpoint
sim(deviceToken: deviceToken2)
sim(deviceToken: deviceToken2, delay: 3)

guard let expectation = delayedDeviceTokenExpectation else {
XCTFail()
Expand Down

0 comments on commit e58bb37

Please sign in to comment.