Use release instead of year

This commit is contained in:
Claudio Ortolina
2024-10-02 14:22:22 +01:00
parent 97b04ba8a2
commit 024d95da7c
13 changed files with 44 additions and 42 deletions
@@ -33,7 +33,7 @@ defmodule MusicLibraryWeb.RecordLiveTest do
for record <- present do
assert html =~ escape(record.title)
assert html =~ to_string(record.year)
assert html =~ to_string(record.release)
for artist <- record.artists do
assert html =~ escape(artist["name"])
+2 -2
View File
@@ -14,7 +14,7 @@ defmodule Obsidian.ParserTest do
type: :album,
musicbrainz_id: "20790e26-98e4-3ad3-a67f-b674758b942d",
title: "Marbles",
year: 2004,
release: "2004",
image_url:
"https://coverartarchive.org/release-group/20790e26-98e4-3ad3-a67f-b674758b942d/front",
genres: [
@@ -41,7 +41,7 @@ defmodule Obsidian.ParserTest do
musicbrainz_id: "950092d6-45f6-4269-87da-99a9ff2fcc52",
title: "Guardians of the Galaxy: Awesome Mix, Vol. 1",
type: :album,
year: 2014
release: "2014"
}}
end
end
+1 -1
View File
@@ -44,7 +44,7 @@ defmodule MusicLibrary.RecordsFixtures do
title: Enum.random(@titles),
type: :album,
format: :cd,
year: Enum.random(1969..2024)
release: Enum.random(1969..2024) |> Integer.to_string()
})
|> MusicLibrary.Records.create_record()