Skip to content

Commit b216ffa

Browse files
committed
Update OneSignalNotificationsTests.swift
1 parent 5096cd0 commit b216ffa

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

iOS_SDK/OneSignalSDK/OneSignalNotificationsTests/OneSignalNotificationsTests.swift

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,27 +46,35 @@ final class OneSignalNotificationsTests: XCTestCase {
4646
// NotificationManager Start to register lifecycle listener
4747
OSNotificationsManager.start()
4848
// Set badge count > 0
49-
print("💛 testClearBadgesWhenAppEntersForeground setting applicationIconBadgeNumber")
49+
print("💛 testClearBadgesWhenAppEntersForeground setting applicationIconBadgeNumber = 1")
5050
UIApplication.shared.applicationIconBadgeNumber = 1
51+
print("🥑 applicationIconBadgeNumber is \(UIApplication.shared.applicationIconBadgeNumber)")
52+
5153
// Then background the app
5254
OneSignalCoreMocks.backgroundApp()
5355
// Foreground the app
5456
OneSignalCoreMocks.foregroundApp()
5557
// Ensure that badge count == 0
58+
print("🥑 applicationIconBadgeNumber now is \(UIApplication.shared.applicationIconBadgeNumber)")
59+
5660
XCTAssertEqual(UIApplication.shared.applicationIconBadgeNumber, 0)
5761
}
5862

5963
func testDontclearBadgesWhenAppBecomesActive() throws { // Unable to make it fail alone
6064
// NotificationManager Start to register lifecycle listener
6165
OSNotificationsManager.start()
6266
// Set badge count > 0
63-
print("💛 testDontclearBadgesWhenAppBecomesActive setting applicationIconBadgeNumber")
67+
print("💛 testDontclearBadgesWhenAppBecomesActive setting applicationIconBadgeNumber = 1")
6468
UIApplication.shared.applicationIconBadgeNumber = 1
69+
print("🥑 applicationIconBadgeNumber is \(UIApplication.shared.applicationIconBadgeNumber)")
70+
6571
// Then resign active
6672
OneSignalCoreMocks.resignActive()
6773
// App becomes active the app
6874
OneSignalCoreMocks.becomeActive()
6975
// Ensure that badge count == 1
76+
print("🥑 applicationIconBadgeNumber now is \(UIApplication.shared.applicationIconBadgeNumber)")
77+
7078
XCTAssertEqual(UIApplication.shared.applicationIconBadgeNumber, 1)
7179
}
7280
//

0 commit comments

Comments
 (0)