From 74a1511b386f26959c683a239c143c716ebcff73 Mon Sep 17 00:00:00 2001 From: Abhishek Banthia <8280282+n0shake@users.noreply.github.com> Date: Sun, 31 Mar 2024 14:32:30 -0400 Subject: [PATCH] Fix test. --- Clocker/ClockerUnitTests/ClockerUnitTests.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Clocker/ClockerUnitTests/ClockerUnitTests.swift b/Clocker/ClockerUnitTests/ClockerUnitTests.swift index 60d24c7..7b56b2a 100644 --- a/Clocker/ClockerUnitTests/ClockerUnitTests.swift +++ b/Clocker/ClockerUnitTests/ClockerUnitTests.swift @@ -171,14 +171,14 @@ class ClockerUnitTests: XCTestCase { // CI is calibrated to be on LA timezone! func testTimeDifference() { let observingDaylightSavings = TimeZone.autoupdatingCurrent.isDaylightSavingTime(for: Date()) - let expectedDifference = observingDaylightSavings ? ", 9h 30m ahead" : ", 10h 30m ahead" - let expectedDifferenceForAuckland = observingDaylightSavings ? ", 16h ahead" : ", 18h ahead" + let expectedDifference = observingDaylightSavings ? ", +9h 30m" : ", +10h 30m" + let expectedDifferenceForAuckland = observingDaylightSavings ? ", +16h" : ", +18h" XCTAssertTrue(operations.timeDifference() == expectedDifference, "Difference was unexpectedly: \(operations.timeDifference())") - XCTAssertTrue(californiaOperations.timeDifference() == ", 3h behind", "Difference was unexpectedly: \(californiaOperations.timeDifference())") + XCTAssertTrue(californiaOperations.timeDifference() == ",-3h", "Difference was unexpectedly: \(californiaOperations.timeDifference())") XCTAssertTrue(floridaOperations.timeDifference() == "", "Difference was unexpectedly: \(floridaOperations.timeDifference())") XCTAssertTrue(aucklandOperations.timeDifference() == expectedDifferenceForAuckland, "Difference was unexpectedly: \(aucklandOperations.timeDifference())") - XCTAssertTrue(omahaOperations.timeDifference() == ", 1h behind", "Difference was unexpectedly: \(omahaOperations.timeDifference())") + XCTAssertTrue(omahaOperations.timeDifference() == " ,-1h", "Difference was unexpectedly: \(omahaOperations.timeDifference())") } func testSunriseSunset() {