summaryrefslogtreecommitdiff
path: root/test/support/conn_case.ex
diff options
context:
space:
mode:
authorIvan Tashkinov <ivantashkinov@gmail.com>2020-12-26 22:23:05 +0300
committerIvan Tashkinov <ivantashkinov@gmail.com>2020-12-26 22:23:05 +0300
commit4134abef63e1165f5701741c1012e64cb908654c (patch)
treebf531d2f464297c46edeaaf02e6966c1695934a5 /test/support/conn_case.ex
parentcbb19d0e1882f5ce641f30b51d7156336f81aba9 (diff)
parente4f1d8f48c85b8a388d6c3945db157de5ce588c5 (diff)
downloadpleroma-4134abef63e1165f5701741c1012e64cb908654c.tar.gz
pleroma-4134abef63e1165f5701741c1012e64cb908654c.zip
Merge remote-tracking branch 'remotes/origin/develop' into feature/object-hashtags-rework
Diffstat (limited to 'test/support/conn_case.ex')
-rw-r--r--test/support/conn_case.ex12
1 files changed, 9 insertions, 3 deletions
diff --git a/test/support/conn_case.ex b/test/support/conn_case.ex
index 47cb65a80..02f49c590 100644
--- a/test/support/conn_case.ex
+++ b/test/support/conn_case.ex
@@ -116,12 +116,16 @@ defmodule Pleroma.Web.ConnCase do
end
setup tags do
- Cachex.clear(:user_cache)
- Cachex.clear(:object_cache)
: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
if tags[:needs_streamer] do
@@ -132,6 +136,8 @@ defmodule Pleroma.Web.ConnCase do
})
end
+ Pleroma.DataCase.stub_pipeline()
+
{:ok, conn: Phoenix.ConnTest.build_conn()}
end
end