23 lines
438 B
Elixir
23 lines
438 B
Elixir
|
defmodule Bright.PatronsFixtures do
|
||
|
@moduledoc """
|
||
|
This module defines test helpers for creating
|
||
|
entities via the `Bright.Patrons` context.
|
||
|
"""
|
||
|
|
||
|
@doc """
|
||
|
Generate a patron.
|
||
|
"""
|
||
|
def patron_fixture(attrs \\ %{}) do
|
||
|
{:ok, patron} =
|
||
|
attrs
|
||
|
|> Enum.into(%{
|
||
|
lifetime_support_cents: 42,
|
||
|
name: "some name",
|
||
|
public: true
|
||
|
})
|
||
|
|> Bright.Patrons.create_patron()
|
||
|
|
||
|
patron
|
||
|
end
|
||
|
end
|