memEx/test/support/fixtures/steps_fixtures.ex

23 lines
426 B
Elixir
Raw Normal View History

2022-07-25 20:18:39 -04:00
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