Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/fares/fare_info.ex
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ defmodule Fares.FareInfo do
monthly: "257.00",
monthly_reduced: "124.00"
},
%{mode: :foxboro, round_trip: "WorldCup"},
%{mode: :foxboro, round_trip: "20.00"},
%{
mode: :subway,
charlie_card_price: "2.40",
Expand Down Expand Up @@ -792,15 +792,15 @@ defmodule Fares.FareInfo do
]
end

def mapper(%{mode: :foxboro, round_trip: "WorldCup"}) do
def mapper(%{mode: :foxboro, round_trip: round_trip}) do
[
%Fare{
mode: :commuter_rail,
name: :foxboro,
duration: :round_trip,
media: [:mticket, :special_event, :cash],
reduced: nil,
cents: "WorldCup"
cents: dollars_to_cents(round_trip)
}
]
end
Expand Down
1 change: 0 additions & 1 deletion lib/fares/format.ex
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ defmodule Fares.Format do
@spec price(Fare.t() | non_neg_integer | nil) :: String.t()
def price(nil), do: ""
def price(%Fare{cents: +0.0}), do: ~t"Free"
def price("WorldCup"), do: ~t(Special ticket required)
def price(%Fare{cents: cents}), do: price(cents)
def price(0), do: ~t"Free"
def price(cents), do: (cents / 100) |> Cldr.Number.to_string!(currency: "USD")
Expand Down
5 changes: 0 additions & 5 deletions priv/gettext/dotcom.pot
Original file line number Diff line number Diff line change
Expand Up @@ -3873,11 +3873,6 @@ msgstr ""
msgid "Special Event Ticket"
msgstr ""

#: lib/fares/format.ex
#, elixir-autogen, elixir-format
msgid "Special ticket required"
msgstr ""

#: lib/dotcom_web/live/subway_alerts_live.ex
#, elixir-autogen, elixir-format
msgid "Station & Service Alerts"
Expand Down
5 changes: 0 additions & 5 deletions priv/gettext/en/LC_MESSAGES/dotcom.po
Original file line number Diff line number Diff line change
Expand Up @@ -3873,11 +3873,6 @@ msgstr ""
msgid "Special Event Ticket"
msgstr ""

#: lib/fares/format.ex
#, elixir-autogen, elixir-format
msgid "Special ticket required"
msgstr ""

#: lib/dotcom_web/live/subway_alerts_live.ex
#, elixir-autogen, elixir-format
msgid "Station & Service Alerts"
Expand Down
5 changes: 0 additions & 5 deletions priv/gettext/es/LC_MESSAGES/dotcom.po
Original file line number Diff line number Diff line change
Expand Up @@ -3890,11 +3890,6 @@ msgstr "Dirección sur"
msgid "Special Event Ticket"
msgstr "Boleto de Eventos Especiales"

#: lib/fares/format.ex
#, elixir-autogen, elixir-format
msgid "Special ticket required"
msgstr "Se requiere boleto especial"

#: lib/dotcom_web/live/subway_alerts_live.ex
#, elixir-autogen, elixir-format
msgid "Station & Service Alerts"
Expand Down
5 changes: 0 additions & 5 deletions priv/gettext/fr-FR/LC_MESSAGES/dotcom.po
Original file line number Diff line number Diff line change
Expand Up @@ -3891,11 +3891,6 @@ msgstr "Direction sud"
msgid "Special Event Ticket"
msgstr "Poste d’événement spécial"

#: lib/fares/format.ex
#, elixir-autogen, elixir-format
msgid "Special ticket required"
msgstr "Poste spécial requis"

#: lib/dotcom_web/live/subway_alerts_live.ex
#, elixir-autogen, elixir-format
msgid "Station & Service Alerts"
Expand Down
5 changes: 0 additions & 5 deletions priv/gettext/ht/LC_MESSAGES/dotcom.po
Original file line number Diff line number Diff line change
Expand Up @@ -3880,11 +3880,6 @@ msgstr "Direksyon sid"
msgid "Special Event Ticket"
msgstr "Tikè pou evènman espesyal"

#: lib/fares/format.ex
#, elixir-autogen, elixir-format
msgid "Special ticket required"
msgstr "Tikè espesyal obligatwa"

#: lib/dotcom_web/live/subway_alerts_live.ex
#, elixir-autogen, elixir-format
msgid "Station & Service Alerts"
Expand Down
5 changes: 0 additions & 5 deletions priv/gettext/pt-BR/LC_MESSAGES/dotcom.po
Original file line number Diff line number Diff line change
Expand Up @@ -3887,11 +3887,6 @@ msgstr "Sentido sul"
msgid "Special Event Ticket"
msgstr "Evento Especial"

#: lib/fares/format.ex
#, elixir-autogen, elixir-format
msgid "Special ticket required"
msgstr "É necessário um requisito especial."

#: lib/dotcom_web/live/subway_alerts_live.ex
#, elixir-autogen, elixir-format
msgid "Station & Service Alerts"
Expand Down
5 changes: 0 additions & 5 deletions priv/gettext/vi/LC_MESSAGES/dotcom.po
Original file line number Diff line number Diff line change
Expand Up @@ -3882,11 +3882,6 @@ msgstr "Hướng Nam"
msgid "Special Event Ticket"
msgstr "Special Event vé"

#: lib/fares/format.ex
#, elixir-autogen, elixir-format
msgid "Special ticket required"
msgstr "Yêu cầu vé đặc biệt"

#: lib/dotcom_web/live/subway_alerts_live.ex
#, elixir-autogen, elixir-format
msgid "Station & Service Alerts"
Expand Down
5 changes: 0 additions & 5 deletions priv/gettext/zh-CN/LC_MESSAGES/dotcom.po
Original file line number Diff line number Diff line change
Expand Up @@ -3867,11 +3867,6 @@ msgstr "南行"
msgid "Special Event Ticket"
msgstr "特别活动车票"

#: lib/fares/format.ex
#, elixir-autogen, elixir-format
msgid "Special ticket required"
msgstr "需要特殊车票"

#: lib/dotcom_web/live/subway_alerts_live.ex
#, elixir-autogen, elixir-format
msgid "Station & Service Alerts"
Expand Down
5 changes: 0 additions & 5 deletions priv/gettext/zh-TW/LC_MESSAGES/dotcom.po
Original file line number Diff line number Diff line change
Expand Up @@ -3867,11 +3867,6 @@ msgstr "南行"
msgid "Special Event Ticket"
msgstr "特別活動車票"

#: lib/fares/format.ex
#, elixir-autogen, elixir-format
msgid "Special ticket required"
msgstr "需要特殊車票"

#: lib/dotcom_web/live/subway_alerts_live.ex
#, elixir-autogen, elixir-format
msgid "Station & Service Alerts"
Expand Down
13 changes: 0 additions & 13 deletions test/fares/fare_info_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -269,19 +269,6 @@ defmodule Fares.FareInfoTest do
cents: 500
} in fares
end

test "maps the World Cup special event trains" do
fares = mapper(%{mode: :foxboro, round_trip: "WorldCup"})

assert %Fares.Fare{
mode: :commuter_rail,
name: :foxboro,
duration: :round_trip,
media: [:mticket, :special_event, :cash],
reduced: nil,
cents: "WorldCup"
} in fares
end
end

describe "mticket_price/1" do
Expand Down
5 changes: 0 additions & 5 deletions test/fares/format_test.exs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
defmodule Fares.FormatTest do
use ExUnit.Case, async: true
use ExUnitProperties
use Dotcom.Gettext.Sigils

import Fares.Format
import Test.Support.Factories.Routes.Route
Expand All @@ -17,10 +16,6 @@ defmodule Fares.FormatTest do
test "returns empty string when fare is nil" do
assert price(nil) == ""
end

test "returns appropriate string when WorldCup is the price" do
assert price("WorldCup") == ~t(Special ticket required)
end
end

describe "media/1" do
Expand Down
Loading