Skip to content

Commit

Permalink
Fix tests on CI.
Browse files Browse the repository at this point in the history
  • Loading branch information
n0shake committed Nov 30, 2020
1 parent 431ed8d commit 82c4d4d
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions Clocker/ClockerUnitTests/ClockerUnitTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -153,12 +153,13 @@ class ClockerUnitTests: XCTestCase {
}

// The below test might fail outside California or if DST is active!
// CI is calibrated to be on LA timezone!
func testTimeDifference() {
XCTAssertTrue(operations.timeDifference() == ", 11 hours 30 mins ahead", "Difference was unexpectedly: \(operations.timeDifference())")
XCTAssertTrue(californiaOperations.timeDifference() == ", 2 hours behind", "Difference was unexpectedly: \(californiaOperations.timeDifference())")
XCTAssertTrue(floridaOperations.timeDifference() == ", an hour ahead", "Difference was unexpectedly: \(floridaOperations.timeDifference())")
XCTAssertTrue(aucklandOperations.timeDifference() == ", 19 hours ahead", "Difference was unexpectedly: \(aucklandOperations.timeDifference())")
XCTAssertTrue(omahaOperations.timeDifference() == "", "Difference was unexpectedly: \(omahaOperations.timeDifference())")
XCTAssertTrue(operations.timeDifference() == ", 13 hours 30 mins ahead", "Difference was unexpectedly: \(operations.timeDifference())")
XCTAssertTrue(californiaOperations.timeDifference() == "", "Difference was unexpectedly: \(californiaOperations.timeDifference())")
XCTAssertTrue(floridaOperations.timeDifference() == ", 3 hours ahead", "Difference was unexpectedly: \(floridaOperations.timeDifference())")
XCTAssertTrue(aucklandOperations.timeDifference() == ", 21 hours ahead", "Difference was unexpectedly: \(aucklandOperations.timeDifference())")
XCTAssertTrue(omahaOperations.timeDifference() == ", 2 hours ahead", "Difference was unexpectedly: \(omahaOperations.timeDifference())")
}

func testSunriseSunset() {
Expand Down

0 comments on commit 82c4d4d

Please sign in to comment.