diff --git a/test/support/fixtures/links_fixtures.ex b/test/support/fixtures/links_fixtures.ex index 115ab82..4408c69 100644 --- a/test/support/fixtures/links_fixtures.ex +++ b/test/support/fixtures/links_fixtures.ex @@ -4,21 +4,12 @@ defmodule LinkShortener.LinksFixtures do entities via the `LinkShortener.Links` context. """ - alias LinkShortener.Links + alias LinkShortener.Factories.LinkFactory @doc """ Generate a link. """ def link_fixture(attrs \\ %{}) do - {:ok, link} = - attrs - |> Enum.into(%{ - name: "some name", - url: "https://gitlab.com/KKlochko/link_shortener", - shorten: "api-article", - }) - |> Links.create_one() - - link + LinkFactory.create_link(attrs) end end