add notes

This commit is contained in:
2022-07-25 20:08:40 -04:00
parent 1a423f703b
commit 63fca7ff6a
14 changed files with 607 additions and 12 deletions

View File

@ -0,0 +1,23 @@
defmodule Memex.NotesFixtures do
@moduledoc """
This module defines test helpers for creating
entities via the `Memex.Notes` context.
"""
@doc """
Generate a note.
"""
def note_fixture(attrs \\ %{}) do
{:ok, note} =
attrs
|> Enum.into(%{
content: "some content",
tag: [],
title: "some title",
visibility: :public
})
|> Memex.Notes.create_note()
note
end
end