From 0e322169e3ddaab7a6d532f1e6f0ce3a382a024a Mon Sep 17 00:00:00 2001 From: David Christiandy <1299411+dvdchr@users.noreply.github.com> Date: Fri, 27 May 2022 12:18:16 +0700 Subject: [PATCH] Fix broken tests --- .../PromptRemindersSchedulerTests.swift | 22 +++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/WordPress/WordPressTest/PromptRemindersSchedulerTests.swift b/WordPress/WordPressTest/PromptRemindersSchedulerTests.swift index 77bf060393ff..10ba844d956b 100644 --- a/WordPress/WordPressTest/PromptRemindersSchedulerTests.swift +++ b/WordPress/WordPressTest/PromptRemindersSchedulerTests.swift @@ -88,18 +88,32 @@ class PromptRemindersSchedulerTests: XCTestCase { // prompt notifications Expected(body: "Prompt text 1", dateComponents: .init(year: 2022, month: 5, day: 21, hour: hour, minute: minute), - userInfo: ["promptID": 101, "siteID": siteID]), + userInfo: [ + PushNotificationsManager.Notification.typeKey: PushNotificationsManager.Notification.bloggingPrompts, + PushNotificationsManager.BloggingPromptPayload.promptIDKey: 101, + PushNotificationsManager.BloggingPromptPayload.siteIDKey: siteID + ]), Expected(body: "Prompt text 8", dateComponents: .init(year: 2022, month: 5, day: 28, hour: hour, minute: minute), - userInfo: ["promptID": 108, "siteID": siteID]), + userInfo: [ + PushNotificationsManager.Notification.typeKey: PushNotificationsManager.Notification.bloggingPrompts, + PushNotificationsManager.BloggingPromptPayload.promptIDKey: 108, + PushNotificationsManager.BloggingPromptPayload.siteIDKey: siteID + ]), // static notifications Expected(body: .staticNotificationContent, dateComponents: .init(year: 2022, month: 6, day: 4, hour: hour, minute: minute), - userInfo: ["siteID": siteID]), + userInfo: [ + PushNotificationsManager.Notification.typeKey: PushNotificationsManager.Notification.bloggingPrompts, + PushNotificationsManager.BloggingPromptPayload.siteIDKey: siteID + ]), Expected(body: .staticNotificationContent, dateComponents: .init(year: 2022, month: 6, day: 11, hour: hour, minute: minute), - userInfo: ["siteID": siteID]) + userInfo: [ + PushNotificationsManager.Notification.typeKey: PushNotificationsManager.Notification.bloggingPrompts, + PushNotificationsManager.BloggingPromptPayload.siteIDKey: siteID + ]), ] } }