Stabilize unit and UI tests for SportsTime
This commit is contained in:
@@ -22,8 +22,8 @@ struct SuggestedTripTests {
|
||||
preferences: TripPreferences(
|
||||
planningMode: .dateRange,
|
||||
sports: [.mlb],
|
||||
startDate: Date(),
|
||||
endDate: Date().addingTimeInterval(86400 * 7),
|
||||
startDate: TestClock.now,
|
||||
endDate: TestClock.now.addingTimeInterval(86400 * 7),
|
||||
leisureLevel: .moderate
|
||||
),
|
||||
stops: [],
|
||||
@@ -339,7 +339,7 @@ struct CrossCountryFeatureTripTests {
|
||||
idPrefix: String
|
||||
) -> [Game] {
|
||||
var games: [Game] = []
|
||||
let calendar = Calendar.current
|
||||
let calendar = TestClock.calendar
|
||||
|
||||
for (index, stadium) in stadiums.enumerated() {
|
||||
let gameDate = calendar.date(byAdding: .day, value: index * spacingDays, to: startDate) ?? startDate
|
||||
@@ -373,7 +373,7 @@ struct CrossCountryFeatureTripTests {
|
||||
idPrefix: "e2w"
|
||||
)
|
||||
|
||||
let secondLegStart = Calendar.current.date(
|
||||
let secondLegStart = TestClock.calendar.date(
|
||||
byAdding: .day,
|
||||
value: (sortedEastToWest.count * spacingDays) + 2,
|
||||
to: baseDate
|
||||
|
||||
Reference in New Issue
Block a user