Skip to content

Commit

Permalink
fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
erikng committed Mar 15, 2022
1 parent 35fe242 commit 2b80cb8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions NudgeTests/NudgeTests.swift
Expand Up @@ -15,7 +15,7 @@ class NudgeTests: XCTestCase {
let dateFormatter = DateFormatter()
dateFormatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss'Z'"
let formattedDate = dateFormatter.date(from: dateString) ?? Date()
return formattedDate.addingTimeInterval(Double(-6 * 3600))
return formattedDate
}

override func setUp() {
Expand Down Expand Up @@ -47,8 +47,7 @@ class NudgeTests: XCTestCase {
}

func testRequiredInstallationDateDemoMode() {
let testDate = coerceStringToDate(dateString: "1970-01-01T00:00:00Z")
defaultPreferencesForTests["requiredInstallationDate"] = testDate
defaultPreferencesForTests["requiredInstallationDate"] = Date(timeIntervalSince1970: 0)
PrefsWrapper.prefsOverride = defaultPreferencesForTests
XCTAssertEqual(
Date(timeIntervalSince1970: 0),
Expand Down

0 comments on commit 2b80cb8

Please sign in to comment.