Skip to content

Commit

Permalink
fixup! cleanup: Add more alert factories for use in SystemStatus.Subw…
Browse files Browse the repository at this point in the history
…ayTests
  • Loading branch information
joshlarson committed Feb 7, 2025
1 parent 8bf0570 commit cd4e54e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions test/support/factories/alerts/alert.ex
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ defmodule Test.Support.Factories.Alerts.Alert do
alias Test.Support.Factories.Alerts.InformedEntity
alias Test.Support.Factories.Alerts.InformedEntitySet

@high_priority_effects [:delay, :shuttle, :station_closure, :suspension]

def alert_factory do
%Alert{
id: :rand.uniform(999) |> Integer.to_string(),
Expand Down Expand Up @@ -46,7 +44,7 @@ defmodule Test.Support.Factories.Alerts.Alert do
end

def with_high_priority_effect(alert) do
%{alert | effect: Faker.Util.pick(@high_priority_effects)}
%{alert | effect: Faker.Util.pick(Dotcom.SystemStatus.Alerts.service_effects())}
end

def active_during(alert, time) do
Expand Down

0 comments on commit cd4e54e

Please sign in to comment.