Fix Sandbox module not available in DataCase setup
The alias was inside the `using` block (only available to consumers), but setup_sandbox/1 runs in DataCase itself. Use fully qualified name.
This commit is contained in:
parent
5d49af2790
commit
c18f9cd2e3
@ -38,8 +38,8 @@ defmodule Firehose.DataCase do
|
|||||||
Sets up the sandbox based on the test tags.
|
Sets up the sandbox based on the test tags.
|
||||||
"""
|
"""
|
||||||
def setup_sandbox(tags) do
|
def setup_sandbox(tags) do
|
||||||
pid = Sandbox.start_owner!(Firehose.Repo, shared: not tags[:async])
|
pid = Ecto.Adapters.SQL.Sandbox.start_owner!(Firehose.Repo, shared: not tags[:async])
|
||||||
on_exit(fn -> Sandbox.stop_owner(pid) end)
|
on_exit(fn -> Ecto.Adapters.SQL.Sandbox.stop_owner(pid) end)
|
||||||
end
|
end
|
||||||
|
|
||||||
@doc """
|
@doc """
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user