Aggiedit/test/support/fixtures/uploads_fixtures.ex

23 lines
431 B
Elixir

defmodule Aggiedit.UploadsFixtures do
@moduledoc """
This module defines test helpers for creating
entities via the `Aggiedit.Uploads` context.
"""
@doc """
Generate a upload.
"""
def upload_fixture(attrs \\ %{}) do
{:ok, upload} =
attrs
|> Enum.into(%{
file: "some file",
mime: "some mime",
size: 42
})
|> Aggiedit.Uploads.create_upload()
upload
end
end