From 88d6e973901c142c732deabd9c4ab0c750b6821e Mon Sep 17 00:00:00 2001 From: Melody Horn Date: Thu, 26 Sep 2024 10:29:40 -0600 Subject: [PATCH] fix: add duration_certainty to AlertView --- 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"]