zoeys.computer/test/support/fixtures/links_fixtures.ex

21 lines
383 B
Elixir
Raw Normal View History

2024-10-21 13:57:31 -04:00
defmodule Zoeyscomputer.LinksFixtures do
@moduledoc """
This module defines test helpers for creating
entities via the `Zoeyscomputer.Links` context.
"""
@doc """
Generate a link.
"""
def link_fixture(attrs \\ %{}) do
{:ok, link} =
attrs
|> Enum.into(%{
url: "some url"
})
|> Zoeyscomputer.Links.create_link()
link
end
end