phx update

This commit is contained in:
2023-11-07 08:52:09 +01:00
parent 8ad54eda1c
commit b2439d7251
974 changed files with 4538 additions and 1120 deletions

View File

@ -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 """