From a03a4903fc166ddb2eafddae74efe3222a1c1888 Mon Sep 17 00:00:00 2001 From: Melody Horn Date: Tue, 1 Oct 2024 11:28:12 -0600 Subject: [PATCH] fix: add duration_certainty to AlertView (#831) --- apps/api_web/lib/api_web/views/alert_view.ex | 3 ++- apps/api_web/test/api_web/views/alert_view_test.exs | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/apps/api_web/lib/api_web/views/alert_view.ex b/apps/api_web/lib/api_web/views/alert_view.ex index 398066d8..e699115c 100644 --- a/apps/api_web/lib/api_web/views/alert_view.ex +++ b/apps/api_web/lib/api_web/views/alert_view.ex @@ -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 diff --git a/apps/api_web/test/api_web/views/alert_view_test.exs b/apps/api_web/test/api_web/views/alert_view_test.exs index a0fb1626..1b3e1e9a 100644 --- a/apps/api_web/test/api_web/views/alert_view_test.exs +++ b/apps/api_web/test/api_web/views/alert_view_test.exs @@ -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 @@ -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"]