Skip to content

Commit

Permalink
fix: Temporarily allow 3 routes on Providence/Stoughton line for Fall…
Browse files Browse the repository at this point in the history
… 2023 diversion
  • Loading branch information
clem-hertling committed Sep 14, 2023
1 parent d63f9e3 commit 0878ace
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions apps/state_mediator/test/state_mediator/integration/gtfs_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -195,27 +195,28 @@ defmodule StateMediator.Integration.GtfsTest do
assert [%{name: "Braintree - Alewife"}, %{name: "Ashmont - Alewife"}] = shapes_1
end

test "Providence/Stoughton has 2 non-ignored shapes each direction" do
test "Providence/Stoughton has 3 non-ignored shapes each direction" do
[shapes_0, shapes_1] = shapes_in_both_directions("CR-Providence")

assert [%{name: "South Station - Wickford Junction"}, %{name: "South Station - Stoughton"}] =
assert [
%{name: "South Station - Wickford Junction"},
%{id: "9890004"},
%{id: "SouthStationToStoughtonViaFairmount"}
] = shapes_0

assert [%{name: "Wickford Junction - South Station"}, %{id: "9890003"}] = shapes_1
end

test "Newburyport/Rockport has 2 non-ignored shapes each direction" do
[shapes_0, shapes_1] = shapes_in_both_directions("CR-Newburyport")

assert [%{name: "North Station - Rockport"}, %{name: "North Station - Newburyport"}] =
shapes_0

assert [%{name: "Wickford Junction - South Station"}, %{name: "Stoughton - South Station"}] =
assert [%{name: "Rockport - North Station"}, %{name: "Newburyport - North Station"}] =
shapes_1
end

# Disable Newburyport/Rockport Line check while Rockport Branch is closed, Fall 2022
# test "Newburyport/Rockport has 2 non-ignored shapes each direction" do
# [shapes_0, shapes_1] = shapes_in_both_directions("CR-Newburyport")
#
# assert [%{name: "North Station - Rockport"}, %{name: "North Station - Newburyport"}] =
# shapes_0
#
# assert [%{name: "Rockport - North Station"}, %{name: "Newburyport - North Station"}] =
# shapes_1
# end

test "all shuttle shapes have negative priority" do
invalid_shapes =
for shape <- State.Shape.all(), String.ends_with?(shape.id, "-S"), shape.priority >= 0 do
Expand Down

0 comments on commit 0878ace

Please sign in to comment.