Rename image* to cover*
This commit is contained in:
@@ -15,7 +15,7 @@ defmodule Obsidian.ParserTest do
|
||||
musicbrainz_id: "20790e26-98e4-3ad3-a67f-b674758b942d",
|
||||
title: "Marbles",
|
||||
release: "2004",
|
||||
image_url:
|
||||
cover_url:
|
||||
"https://coverartarchive.org/release-group/20790e26-98e4-3ad3-a67f-b674758b942d/front",
|
||||
genres: [
|
||||
"alternative rock",
|
||||
@@ -36,7 +36,7 @@ defmodule Obsidian.ParserTest do
|
||||
{:ok,
|
||||
%Entry{
|
||||
genres: ["classic rock", "pop", "pop rock", "rock"],
|
||||
image_url:
|
||||
cover_url:
|
||||
"https://coverartarchive.org/release-group/950092d6-45f6-4269-87da-99a9ff2fcc52/front",
|
||||
musicbrainz_id: "950092d6-45f6-4269-87da-99a9ff2fcc52",
|
||||
title: "Guardians of the Galaxy: Awesome Mix, Vol. 1",
|
||||
|
||||
@@ -29,7 +29,7 @@ defmodule MusicLibrary.RecordsFixtures do
|
||||
"Thick as a Brick"
|
||||
]
|
||||
# While it would be great to have this random, it's ok to use one single image
|
||||
@image_data_path "#{__DIR__}/marillion-marbles.jpg"
|
||||
@cover_data_path "#{__DIR__}/marillion-marbles.jpg"
|
||||
|
||||
def record_fixture(attrs \\ %{}) do
|
||||
musicbrainz_id = Ecto.UUID.generate()
|
||||
@@ -38,8 +38,8 @@ defmodule MusicLibrary.RecordsFixtures do
|
||||
attrs
|
||||
|> Enum.into(%{
|
||||
genres: Enum.take_random(@genres, :rand.uniform(3)),
|
||||
image_url: "https://coverartarchive.org/release-group/#{musicbrainz_id}/front",
|
||||
image_data: File.read!(@image_data_path),
|
||||
cover_url: "https://coverartarchive.org/release-group/#{musicbrainz_id}/front",
|
||||
cover_data: File.read!(@cover_data_path),
|
||||
musicbrainz_id: musicbrainz_id,
|
||||
title: Enum.random(@titles),
|
||||
type: :album,
|
||||
|
||||
Reference in New Issue
Block a user