init
This commit is contained in:
21
test/support/fixtures/monitor_fixtures.ex
Normal file
21
test/support/fixtures/monitor_fixtures.ex
Normal file
@ -0,0 +1,21 @@
|
||||
defmodule Webmon.MonitorFixtures do
|
||||
@moduledoc """
|
||||
This module defines test helpers for creating
|
||||
entities via the `Webmon.Monitor` context.
|
||||
"""
|
||||
|
||||
@doc """
|
||||
Generate a website.
|
||||
"""
|
||||
def website_fixture(attrs \\ %{}) do
|
||||
{:ok, website} =
|
||||
attrs
|
||||
|> Enum.into(%{
|
||||
name: "some name",
|
||||
url: "some url"
|
||||
})
|
||||
|> Webmon.Monitor.create_website()
|
||||
|
||||
website
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user