memEx/test/support/fixtures/steps_fixtures.ex
2022-11-03 18:23:17 -04:00

23 lines
426 B
Elixir

defmodule Memex.StepsFixtures do
@moduledoc """
This module defines test helpers for creating
entities via the `Memex.Steps` context.
"""
@doc """
Generate a step.
"""
def step_fixture(attrs \\ %{}) do
{:ok, step} =
attrs
|> Enum.into(%{
description: "some description",
position: 42,
title: "some title"
})
|> Memex.Steps.create_step()
step
end
end