Display latest purchase in stats page

This commit is contained in:
Claudio Ortolina
2024-10-19 19:46:39 +01:00
parent 36333112a4
commit 28609dcf87
3 changed files with 4 additions and 2 deletions
@@ -42,7 +42,7 @@ defmodule MusicLibraryWeb.StatsControllerTest do
end
test "it shows the latest record", %{conn: conn, records: records} do
latest_record = Enum.max_by(records, & &1.inserted_at)
latest_record = Enum.max_by(records, & &1.purchased_at)
conn = get(conn, "/")