fp/services/bright/test/support/fixtures/patrons_fixtures.ex

23 lines
438 B
Elixir
Raw Normal View History

2025-01-03 14:45:35 +00:00
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