Skip to content

Commit

Permalink
Fix test to check required properties
Browse files Browse the repository at this point in the history
  • Loading branch information
guarani committed Mar 30, 2024
1 parent d617a41 commit e57b288
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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() {
Expand Down

0 comments on commit e57b288

Please sign in to comment.