Autogen calendars
This commit is contained in:
21
test/support/fixtures/season_fixtures.ex
Normal file
21
test/support/fixtures/season_fixtures.ex
Normal file
@@ -0,0 +1,21 @@
|
||||
defmodule Osuuspuutarha.SeasonFixtures do
|
||||
@moduledoc """
|
||||
This module defines test helpers for creating
|
||||
entities via the `Osuuspuutarha.Season` context.
|
||||
"""
|
||||
|
||||
@doc """
|
||||
Generate a calendar.
|
||||
"""
|
||||
def calendar_fixture(attrs \\ %{}) do
|
||||
{:ok, calendar} =
|
||||
attrs
|
||||
|> Enum.into(%{
|
||||
is_picked_up: true,
|
||||
pickup_date: ~D[2023-06-06]
|
||||
})
|
||||
|> Osuuspuutarha.Season.create_calendar()
|
||||
|
||||
calendar
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user