initial book review schema
This commit is contained in:
parent
e218290e08
commit
90414e6b93
15 changed files with 653 additions and 0 deletions
24
test/support/fixtures/book_reads_fixtures.ex
Normal file
24
test/support/fixtures/book_reads_fixtures.ex
Normal file
|
@ -0,0 +1,24 @@
|
|||
defmodule Wild.BookReadsFixtures do
|
||||
@moduledoc """
|
||||
This module defines test helpers for creating
|
||||
entities via the `Wild.BookReads` context.
|
||||
"""
|
||||
|
||||
@doc """
|
||||
Generate a book_read.
|
||||
"""
|
||||
def book_read_fixture(attrs \\ %{}) do
|
||||
{:ok, book_read} =
|
||||
attrs
|
||||
|> Enum.into(%{
|
||||
progress: 42,
|
||||
rating: 42,
|
||||
read_finish: ~U[2025-01-08 10:31:00Z],
|
||||
read_start: ~U[2025-01-08 10:31:00Z],
|
||||
thoughts: "some thoughts"
|
||||
})
|
||||
|> Wild.BookReads.create_book_read()
|
||||
|
||||
book_read
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue