Restructure stats

Split out count by format
This commit is contained in:
Claudio Ortolina
2024-10-08 20:36:39 +01:00
parent 36f1d44468
commit 52c1be1e32
4 changed files with 32 additions and 56 deletions
@@ -27,7 +27,9 @@ defmodule MusicLibraryWeb.StatsControllerTest do
records
|> Enum.frequencies_by(& &1.format)
|> Enum.each(fn {format, count} ->
assert html_response(conn, 200) =~ "#{count} #{Record.format_long_label(format)}"
response = html_response(conn, 200)
assert response =~ "\n#{count}\n"
assert response =~ "\n#{Record.format_long_label(format)}\n"
end)
end