diff options
Diffstat (limited to 'test/support/data_case.ex')
-rw-r--r-- | test/support/data_case.ex | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/support/data_case.ex b/test/support/data_case.ex index 1f1d40863..a3ce9e282 100644 --- a/test/support/data_case.ex +++ b/test/support/data_case.ex @@ -65,8 +65,13 @@ defmodule Pleroma.DataCase do setup tags do :ok = Ecto.Adapters.SQL.Sandbox.checkout(Pleroma.Repo) - unless tags[:async] do + if tags[:async] do + Mox.stub_with(Pleroma.CachexMock, Pleroma.NullCache) + Mox.set_mox_private() + else Ecto.Adapters.SQL.Sandbox.mode(Pleroma.Repo, {:shared, self()}) + Mox.stub_with(Pleroma.CachexMock, Pleroma.CachexProxy) + Mox.set_mox_global() clear_cachex() end |