Prevented error when media item doesn't have description (#274)

This commit is contained in:
Kieran
2024-05-29 13:52:43 -07:00
committed by GitHub
parent e751c65424
commit 3dd901ff3e
2 changed files with 8 additions and 1 deletions
@@ -14,6 +14,13 @@ defmodule PinchflatWeb.MediaItemControllerTest do
assert html_response(conn, 200) =~ "#{media_item.title}"
end
test "renders the page when the media item has no description", %{conn: conn} do
media_item = media_item_with_attachments(%{description: nil})
conn = get(conn, ~p"/sources/#{media_item.source_id}/media/#{media_item}")
assert html_response(conn, 200) =~ "#{media_item.title}"
end
end
describe "edit media" do