21 lines
405 B
Elixir
21 lines
405 B
Elixir
defmodule NotesApp.NotesFixtures do
|
|
@moduledoc """
|
|
This module defines test helpers for creating
|
|
entities via the `NotesApp.Notes` context.
|
|
"""
|
|
|
|
@doc """
|
|
Generate a note.
|
|
"""
|
|
def note_fixture(attrs \\ %{}) do
|
|
{:ok, note} =
|
|
attrs
|
|
|> Enum.into(%{
|
|
content: "some content",
|
|
title: "some title"
|
|
})
|
|
|> NotesApp.Notes.create_note()
|
|
|
|
note
|
|
end
|
|
end
|