Skip to content

Commit

Permalink
quick fix for the unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
erikng committed Jan 9, 2024
1 parent 6908fbe commit 79a2846
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions NudgeTests/NudgeTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
// Created by Erik Gomez on 2/2/21.
//

// TODO: Refactor and rewrite all tests

import XCTest
@testable import Nudge

Expand Down Expand Up @@ -73,7 +75,7 @@ class NudgeTests: XCTestCase {
PrefsWrapper.prefsOverride = defaultPreferencesForTests
XCTAssertEqual(
coerceStringToDate(dateString: "2022-02-01T00:00:00Z"),
Utils().gracePeriodLogic(
AppStateManager().gracePeriodLogic(
currentDate: coerceStringToDate(dateString: "2022-01-01T00:30:00Z"),
testFileDate: coerceStringToDate(dateString: "2022-01-01T00:00:00Z")
)
Expand All @@ -88,7 +90,7 @@ class NudgeTests: XCTestCase {
PrefsWrapper.prefsOverride = defaultPreferencesForTests
XCTAssertEqual(
coerceStringToDate(dateString: "2022-01-03T00:00:00Z"),
Utils().gracePeriodLogic(
AppStateManager().gracePeriodLogic(
currentDate: coerceStringToDate(dateString: "2022-01-02T00:30:00Z"),
testFileDate: coerceStringToDate(dateString: "2022-01-02T00:00:00Z")
)
Expand All @@ -104,7 +106,7 @@ class NudgeTests: XCTestCase {
PrefsWrapper.prefsOverride = defaultPreferencesForTests
XCTAssertEqual(
coerceStringToDate(dateString: "2022-01-01T00:00:00Z"),
Utils().gracePeriodLogic(
AppStateManager().gracePeriodLogic(
currentDate: coerceStringToDate(dateString: "2022-01-03T:00:00Z"),
testFileDate: coerceStringToDate(dateString: "2022-01-01T00:00:00Z")
)
Expand All @@ -120,7 +122,7 @@ class NudgeTests: XCTestCase {
PrefsWrapper.prefsOverride = defaultPreferencesForTests
XCTAssertEqual(
coerceStringToDate(dateString: "2022-01-01T00:00:00Z"),
Utils().gracePeriodLogic(
AppStateManager().gracePeriodLogic(
currentDate: coerceStringToDate(dateString: "2022-06-01T00:00:00Z"),
testFileDate: coerceStringToDate(dateString: "2021-12-01T00:00:00Z")
)
Expand Down

0 comments on commit 79a2846

Please sign in to comment.