basic admin endgame view and add
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
defmodule Chesstrainer.TagsFixtures do
|
||||
@moduledoc """
|
||||
This module defines test helpers for creating
|
||||
entities via the `Chesstrainer.Tags` context.
|
||||
"""
|
||||
|
||||
@doc """
|
||||
Generate a unique tag name.
|
||||
"""
|
||||
def unique_tag_name, do: "some name#{System.unique_integer([:positive])}"
|
||||
|
||||
@doc """
|
||||
Generate a tag.
|
||||
"""
|
||||
def tag_fixture(attrs \\ %{}) do
|
||||
{:ok, tag} =
|
||||
attrs
|
||||
|> Enum.into(%{
|
||||
category: "some category",
|
||||
name: unique_tag_name()
|
||||
})
|
||||
|> Chesstrainer.Tags.create_tag()
|
||||
|
||||
tag
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user