Use long labels for formats in stats page

This commit is contained in:
Claudio Ortolina
2024-10-07 10:04:31 +01:00
parent 409a8414d0
commit be9dc37ed5
3 changed files with 12 additions and 2 deletions
@@ -1,6 +1,8 @@
defmodule MusicLibraryWeb.StatsControllerTest do
use MusicLibraryWeb.ConnCase
alias MusicLibrary.Records.Record
import MusicLibrary.RecordsFixtures
defp create_records(_) do
@@ -25,7 +27,7 @@ defmodule MusicLibraryWeb.StatsControllerTest do
records
|> Enum.frequencies_by(& &1.format)
|> Enum.each(fn {format, count} ->
assert html_response(conn, 200) =~ "#{count} #{format}"
assert html_response(conn, 200) =~ "#{count} #{Record.format_long_label(format)}"
end)
end