From e57b288b55d1053b8586828b39ea4a9f372fbe91 Mon Sep 17 00:00:00 2001 From: Paul Von Schrottky Date: Fri, 29 Mar 2024 22:00:44 -0400 Subject: [PATCH] Fix test to check required properties --- ...tatsAnnualAndMostPopularTimeInsightDecodingTests.swift | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Tests/WordPressKitTests/Tests/StatsAnnualAndMostPopularTimeInsightDecodingTests.swift b/Tests/WordPressKitTests/Tests/StatsAnnualAndMostPopularTimeInsightDecodingTests.swift index 34b7f661..02536846 100644 --- a/Tests/WordPressKitTests/Tests/StatsAnnualAndMostPopularTimeInsightDecodingTests.swift +++ b/Tests/WordPressKitTests/Tests/StatsAnnualAndMostPopularTimeInsightDecodingTests.swift @@ -9,8 +9,7 @@ final class StatsAnnualAndMostPopularTimeInsightDecodingTests: XCTestCase { "highest_hour": 1, "highest_hour_percent": 1, "highest_day_of_week": 1, - "highest_day_percent": 1, - "years": [["year": "2022"]] + "highest_day_percent": 1 ] // When @@ -25,15 +24,14 @@ final class StatsAnnualAndMostPopularTimeInsightDecodingTests: XCTestCase { let json: [String: Any] = [ "highest_hour": 1, "highest_hour_percent": 1, - "highest_day_of_week": 1, - "highest_day_percent": 1 + "highest_day_of_week": 1 ] // When let insight = StatsAnnualAndMostPopularTimeInsight(jsonDictionary: json as [String: AnyObject]) // Then - XCTAssertNotNil(insight) + XCTAssertNil(insight) } func testDecodingDecimalPercentagesRoundsSuccessful() {