Skip to content

Commit

Permalink
fix failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
thecristen committed May 8, 2024
1 parent 0f52913 commit 184fb20
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/dotcom/trip_plan/itinerary_row_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@ defmodule TripPlan.ItineraryRowTest do
use ExUnit.Case, async: true

import Dotcom.TripPlan.ItineraryRow
import Mox
import Test.Support.Factory
alias Dotcom.TripPlan.ItineraryRow
alias Routes.Route
alias Alerts.{Alert, InformedEntity}
alias TripPlan.{Leg, NamedPosition, PersonalDetail}

setup :verify_on_exit!

describe "route_id/1" do
test "returns the route id when a route is present" do
row = %ItineraryRow{route: %Route{id: "route"}}
Expand Down Expand Up @@ -318,6 +321,10 @@ defmodule TripPlan.ItineraryRowTest do
@transit_leg build(:leg, mode: build(:transit_detail))

test "returns an itinerary row from a Leg" do
stub(MBTA.Api.Mock, :get_json, fn "/trips/" <> _, _ ->
%JsonApi{data: [Test.Support.Factory.MbtaApi.build(:trip_item)]}
end)

row = from_leg(@leg, @deps, nil)
assert %ItineraryRow{} = row
end
Expand Down

0 comments on commit 184fb20

Please sign in to comment.