Generate schema and live_view scaffold for records
1. Records are not yet tied to artists 2. The generated edit route, along with related functionality, may be deleted as I don't think it's gonna be needed. Leaving it included in the commit for reference.
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
defmodule MusicLibrary.RecordsFixtures do
|
||||
@moduledoc """
|
||||
This module defines test helpers for creating
|
||||
entities via the `MusicLibrary.Records` context.
|
||||
"""
|
||||
|
||||
@doc """
|
||||
Generate a record.
|
||||
"""
|
||||
def record_fixture(attrs \\ %{}) do
|
||||
{:ok, record} =
|
||||
attrs
|
||||
|> Enum.into(%{
|
||||
genres: ["option1", "option2"],
|
||||
image: "some image",
|
||||
musicbrainz_id: "7488a646-e31f-11e4-aace-600308960662",
|
||||
title: "some title",
|
||||
type: :album,
|
||||
year: 42
|
||||
})
|
||||
|> MusicLibrary.Records.create_record()
|
||||
|
||||
record
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user