summaryrefslogtreecommitdiff
path: root/test/support/conn_case.ex
diff options
context:
space:
mode:
Diffstat (limited to 'test/support/conn_case.ex')
-rw-r--r--test/support/conn_case.ex7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/support/conn_case.ex b/test/support/conn_case.ex
index b5bd71809..a7cebf971 100644
--- a/test/support/conn_case.ex
+++ b/test/support/conn_case.ex
@@ -118,8 +118,13 @@ defmodule Pleroma.Web.ConnCase 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()
Pleroma.DataCase.clear_cachex()
end