Skip to content

Commit

Permalink
Uplift of #27128 (squashed) to release
Browse files Browse the repository at this point in the history
  • Loading branch information
brave-builds committed Jan 7, 2025
1 parent 1ebc61c commit 438b28b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions ios/brave-ios/Tests/GrowthTests/DAUTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -262,13 +262,14 @@ class DAUTests: XCTestCase {
}

func testMondayOfCurrentWeekFormatted() {
// Jan 6th, 2025
let dateForTest = Date(timeIntervalSince1970: 1_736_139_600)

// Making sure gregorian year is showing
let yearString = Date().mondayOfCurrentWeekFormatted?.truncate(length: 4, trailing: "")
let year = Int(yearString!)!

// There is no easy way to mock a different calendar in unit tests, just checking if
// year we get looks 'correct' should be good enough.
XCTAssert(year > 2018 && year < 2025)
XCTAssertEqual(year, 2025)
}

func testNonDefaultWoiExplicitDate() {
Expand Down

0 comments on commit 438b28b

Please sign in to comment.