Skip to content

Commit

Permalink
order the test itinerary start times
Browse files Browse the repository at this point in the history
  • Loading branch information
thecristen committed Dec 12, 2024
1 parent 2b8e577 commit e30aa48
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions test/dotcom_web/live/trip_planner_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,16 @@ defmodule DotcomWeb.Live.TripPlannerTest do

base_itinerary = Factory.build(:itinerary, legs: [base_leg])

Enum.map(headsigns, fn headsign ->
headsigns
|> Enum.with_index()
|> Enum.map(fn {headsign, index} ->
leg = update_in(base_leg, [:trip, :trip_headsign], fn _ -> headsign end)
%{base_itinerary | legs: [leg]}

%{
base_itinerary
| legs: [leg],
start: Timex.shift(base_itinerary.start, minutes: 10 * index)
}
end)
end

Expand Down

0 comments on commit e30aa48

Please sign in to comment.