memEx/test/support/fixtures/steps_fixtures.ex
2022-11-26 20:37:56 -05:00

23 lines
470 B
Elixir

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