Add all
This commit is contained in:
parent
b35e18cd20
commit
82f55f7afe
80 changed files with 6687 additions and 5 deletions
30
test/support/fixtures/media_attachments_fixtures.ex
Normal file
30
test/support/fixtures/media_attachments_fixtures.ex
Normal file
|
@ -0,0 +1,30 @@
|
|||
defmodule Nulla.MediaAttachmentsFixtures do
|
||||
import Nulla.NotesFixtures
|
||||
|
||||
@moduledoc """
|
||||
This module defines test helpers for creating
|
||||
entities via the `Nulla.MediaAttachments` context.
|
||||
"""
|
||||
|
||||
@doc """
|
||||
Generate a media_attachment.
|
||||
"""
|
||||
def media_attachment_fixture(attrs \\ %{}) do
|
||||
note = note_fixture()
|
||||
|
||||
{:ok, media_attachment} =
|
||||
attrs
|
||||
|> Enum.into(%{
|
||||
height: 42,
|
||||
mediaType: "some mediaType",
|
||||
name: "some name",
|
||||
type: "some type",
|
||||
url: "some url",
|
||||
width: 42,
|
||||
note_id: note.id
|
||||
})
|
||||
|> Nulla.MediaAttachments.create_media_attachment()
|
||||
|
||||
media_attachment
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue