server/test/support/fixtures/languages_fixtures.ex

23 lines
448 B
Elixir
Raw Normal View History

defmodule BoardWise.LanguagesFixtures do
@moduledoc """
This module defines test helpers for creating
entities via the `BoardWise.Languages` context.
"""
@doc """
Generate a language.
"""
def language_fixture(attrs \\ %{}) do
{:ok, language} =
attrs
|> Enum.into(%{
code: "some code",
2023-12-05 23:09:19 +00:00
name: "some name",
pos: 0
})
|> BoardWise.Languages.create_language()
language
end
end