Skip to content

Commit e57b288

Browse files
committed
Fix test to check required properties
1 parent d617a41 commit e57b288

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

Tests/WordPressKitTests/Tests/StatsAnnualAndMostPopularTimeInsightDecodingTests.swift

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ final class StatsAnnualAndMostPopularTimeInsightDecodingTests: XCTestCase {
99
"highest_hour": 1,
1010
"highest_hour_percent": 1,
1111
"highest_day_of_week": 1,
12-
"highest_day_percent": 1,
13-
"years": [["year": "2022"]]
12+
"highest_day_percent": 1
1413
]
1514

1615
// When
@@ -25,15 +24,14 @@ final class StatsAnnualAndMostPopularTimeInsightDecodingTests: XCTestCase {
2524
let json: [String: Any] = [
2625
"highest_hour": 1,
2726
"highest_hour_percent": 1,
28-
"highest_day_of_week": 1,
29-
"highest_day_percent": 1
27+
"highest_day_of_week": 1
3028
]
3129

3230
// When
3331
let insight = StatsAnnualAndMostPopularTimeInsight(jsonDictionary: json as [String: AnyObject])
3432

3533
// Then
36-
XCTAssertNotNil(insight)
34+
XCTAssertNil(insight)
3735
}
3836

3937
func testDecodingDecimalPercentagesRoundsSuccessful() {

0 commit comments

Comments
 (0)