init commit
This commit is contained in:
21
test/support/fixtures/devices_fixtures.ex
Normal file
21
test/support/fixtures/devices_fixtures.ex
Normal file
@@ -0,0 +1,21 @@
|
||||
defmodule HereIAm.DevicesFixtures do
|
||||
@moduledoc """
|
||||
This module defines test helpers for creating
|
||||
entities via the `HereIAm.Devices` context.
|
||||
"""
|
||||
|
||||
@doc """
|
||||
Generate a device.
|
||||
"""
|
||||
def device_fixture(attrs \\ %{}) do
|
||||
{:ok, device} =
|
||||
attrs
|
||||
|> Enum.into(%{
|
||||
audio: "some audio",
|
||||
ip_address: "some ip_address"
|
||||
})
|
||||
|> HereIAm.Devices.create_device()
|
||||
|
||||
device
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user