phx update
This commit is contained in:
@ -28,9 +28,16 @@ defmodule Homepage.DataCase do
|
||||
end
|
||||
|
||||
setup tags do
|
||||
Homepage.DataCase.setup_sandbox(tags)
|
||||
:ok
|
||||
end
|
||||
|
||||
@doc """
|
||||
Sets up the sandbox based on the test tags.
|
||||
"""
|
||||
def setup_sandbox(tags) do
|
||||
pid = Ecto.Adapters.SQL.Sandbox.start_owner!(Homepage.Repo, shared: not tags[:async])
|
||||
on_exit(fn -> Ecto.Adapters.SQL.Sandbox.stop_owner(pid) end)
|
||||
:ok
|
||||
end
|
||||
|
||||
@doc """
|
||||
|
Reference in New Issue
Block a user