From 0878acefc300384914489397063a3f7079af3d11 Mon Sep 17 00:00:00 2001 From: Clem Hertling Date: Thu, 14 Sep 2023 15:37:41 -0400 Subject: [PATCH] fix: Temporarily allow 3 routes on Providence/Stoughton line for Fall 2023 diversion --- .../state_mediator/integration/gtfs_test.exs | 29 ++++++++++--------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/apps/state_mediator/test/state_mediator/integration/gtfs_test.exs b/apps/state_mediator/test/state_mediator/integration/gtfs_test.exs index 0eff8bf46..9506cd20b 100644 --- a/apps/state_mediator/test/state_mediator/integration/gtfs_test.exs +++ b/apps/state_mediator/test/state_mediator/integration/gtfs_test.exs @@ -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