2023-12-05 22:32:30 +00:00
|
|
|
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
|
2023-12-05 22:32:30 +00:00
|
|
|
})
|
|
|
|
|> BoardWise.Languages.create_language()
|
|
|
|
|
|
|
|
language
|
|
|
|
end
|
|
|
|
end
|