Include timestamps in record detail page

This commit is contained in:
Claudio Ortolina
2024-10-10 07:59:33 +01:00
parent e4c0ce58f6
commit 10003c34f6
2 changed files with 4 additions and 0 deletions
@@ -43,6 +43,8 @@
<%= genre %> <%= genre %>
</span> </span>
</:item> </:item>
<:item title="Inserted at"><%= @record.inserted_at %></:item>
<:item title="Updated at"><%= @record.updated_at %></:item>
</.list> </.list>
</div> </div>
@@ -36,6 +36,8 @@ defmodule MusicLibraryWeb.RecordShowTest do
assert html =~ Record.format_short_label(record.format) assert html =~ Record.format_short_label(record.format)
assert html =~ record.release assert html =~ record.release
assert html =~ ~p"/covers/#{record.id}?vsn=#{record.cover_hash}" assert html =~ ~p"/covers/#{record.id}?vsn=#{record.cover_hash}"
assert html =~ Phoenix.HTML.Safe.to_iodata(record.inserted_at)
assert html =~ Phoenix.HTML.Safe.to_iodata(record.updated_at)
for artist <- record.artists do for artist <- record.artists do
assert html =~ escape(artist["name"]) assert html =~ escape(artist["name"])