Skip to content

Commit

Permalink
test: fix route_pattern_controller tests with explicit service defs (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
meagharty authored Nov 20, 2023
1 parent 7cc5fc6 commit ef1239c
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ defmodule ApiWeb.RoutePatternControllerTest do
bad_date = Date.add(today, 2)

service = %Model.Service{
id: "service",
id: "service-1-date",
start_date: today,
end_date: today,
added_dates: [today]
Expand Down Expand Up @@ -533,14 +533,14 @@ defmodule ApiWeb.RoutePatternControllerTest do
bad_date = Date.add(today, 2)

service = %Model.Service{
id: "service",
id: "service-1-date-route",
start_date: today,
end_date: today,
added_dates: [today]
}

future_service = %Model.Service{
id: "future_service",
id: "future_service-date-route",
start_date: bad_date,
end_date: bad_date,
added_dates: [bad_date]
Expand Down Expand Up @@ -702,14 +702,14 @@ defmodule ApiWeb.RoutePatternControllerTest do
future_date_iso = Date.to_iso8601(bad_date)

service = %Model.Service{
id: "service",
id: "service-1-date-route-stop-direction",
start_date: today,
end_date: today,
added_dates: [today]
}

future_service = %Model.Service{
id: "future_service",
id: "future_service-date-route-stop-direction",
start_date: bad_date,
end_date: bad_date,
added_dates: [bad_date]
Expand Down Expand Up @@ -829,6 +829,8 @@ defmodule ApiWeb.RoutePatternControllerTest do
service_id: service.id
}

State.Service.new_state([service, future_service])

new_state!(
[stop1, stop2],
[route1, route2],
Expand Down

0 comments on commit ef1239c

Please sign in to comment.