Skip to content

Commit

Permalink
Merge pull request #671 from mbta/ch-fall23-stoughton-branch
Browse files Browse the repository at this point in the history
fix: Use IDs for Stoughton routes on Providence/Stoughton line for Fall 2023 diversion
  • Loading branch information
clem-hertling authored Sep 20, 2023
2 parents df7e38a + 2e93668 commit bb6baf3
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 13 deletions.
20 changes: 20 additions & 0 deletions apps/state/config/config.exs
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,26 @@ config :state, :stops_on_route,
"place-DB-2222",
"place-DB-2205"
],
{"CR-Providence", 0} => [
"place-DB-2265",
"place-DB-2258",
"place-DB-2249",
"place-DB-2240",
"place-DB-2230",
"place-DB-2222",
"place-DB-2205",
"place-DB-0095"
],
{"CR-Providence", 1} => [
"place-DB-2265",
"place-DB-2258",
"place-DB-2249",
"place-DB-2240",
"place-DB-2230",
"place-DB-2222",
"place-DB-2205",
"place-DB-0095"
],
{"CR-Fairmount", 0} => [
"place-FB-0166",
"place-FB-0148",
Expand Down
26 changes: 13 additions & 13 deletions apps/state_mediator/test/state_mediator/integration/gtfs_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -198,24 +198,24 @@ defmodule StateMediator.Integration.GtfsTest do
test "Providence/Stoughton has 2 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"}
] = 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 bb6baf3

Please sign in to comment.