Skip to content

Commit

Permalink
fix: add duration_certainty to AlertView (#831)
Browse files Browse the repository at this point in the history
  • Loading branch information
boringcactus authored Oct 1, 2024
1 parent 11dfa42 commit a03a490
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion apps/api_web/lib/api_web/views/alert_view.ex
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ defmodule ApiWeb.AlertView do
:banner,
:url,
:image,
:image_alternative_text
:image_alternative_text,
:duration_certainty
])

def active_period(%{active_period: periods}, _conn) do
Expand Down
6 changes: 4 additions & 2 deletions apps/api_web/test/api_web/views/alert_view_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ defmodule ApiWeb.AlertViewTest do
timeframe: "timeframe",
lifecycle: "lifecycle",
image: "image",
image_alternative_text: "image alternative text"
image_alternative_text: "image alternative text",
duration_certainty: "KNOWN"
}

test "can do a basic rendering (does not include relationships)", %{conn: conn} do
Expand Down Expand Up @@ -52,7 +53,8 @@ defmodule ApiWeb.AlertViewTest do
"informed_entity" => @alert.informed_entity,
"service_effect" => @alert.service_effect,
"timeframe" => @alert.timeframe,
"lifecycle" => @alert.lifecycle
"lifecycle" => @alert.lifecycle,
"duration_certainty" => @alert.duration_certainty
}

refute rendered["relationships"]
Expand Down

0 comments on commit a03a490

Please sign in to comment.