Add all
This commit is contained in:
parent
b35e18cd20
commit
82f55f7afe
80 changed files with 6687 additions and 5 deletions
33
test/support/fixtures/notes_fixtures.ex
Normal file
33
test/support/fixtures/notes_fixtures.ex
Normal file
|
@ -0,0 +1,33 @@
|
|||
defmodule Nulla.NotesFixtures do
|
||||
import Nulla.ActorsFixtures
|
||||
|
||||
@moduledoc """
|
||||
This module defines test helpers for creating
|
||||
entities via the `Nulla.Notes` context.
|
||||
"""
|
||||
|
||||
@doc """
|
||||
Generate a note.
|
||||
"""
|
||||
def note_fixture(attrs \\ %{}) do
|
||||
actor = actor_fixture()
|
||||
|
||||
{:ok, note} =
|
||||
attrs
|
||||
|> Enum.into(%{
|
||||
cc: ["option1", "option2"],
|
||||
content: "some content",
|
||||
inReplyTo: "some inReplyTo",
|
||||
language: "some language",
|
||||
published: ~U[2025-07-01 09:17:00Z],
|
||||
sensitive: true,
|
||||
to: ["option1", "option2"],
|
||||
url: "some url",
|
||||
visibility: "some visibility",
|
||||
actor_id: actor.id
|
||||
})
|
||||
|> Nulla.Notes.create_note()
|
||||
|
||||
note
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue