summaryrefslogtreecommitdiff
path: root/test/support/conn_case.ex
diff options
context:
space:
mode:
authorAlex Gleason <alex@alexgleason.me>2021-01-06 15:22:35 -0600
committerAlex Gleason <alex@alexgleason.me>2021-01-06 15:22:35 -0600
commit1438fd958325c3d469315c478f06def9e4dd0de3 (patch)
tree738e7e9ce8e0e0af89d9dff411191643cbf45aab /test/support/conn_case.ex
parent2aeb229de3f59e1704c633c31415e7e834f6ba67 (diff)
parent5e128a6be30563adc3b8a938aa68d18ac04cdfa0 (diff)
downloadpleroma-1438fd958325c3d469315c478f06def9e4dd0de3.tar.gz
pleroma-1438fd958325c3d469315c478f06def9e4dd0de3.zip
Merge remote-tracking branch 'upstream/develop' into block-behavior
Diffstat (limited to 'test/support/conn_case.ex')
-rw-r--r--test/support/conn_case.ex14
1 files changed, 11 insertions, 3 deletions
diff --git a/test/support/conn_case.ex b/test/support/conn_case.ex
index 47cb65a80..f20e3d955 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,10 @@ defmodule Pleroma.Web.ConnCase do
})
end
+ Pleroma.DataCase.stub_pipeline()
+
+ Mox.verify_on_exit!()
+
{:ok, conn: Phoenix.ConnTest.build_conn()}
end
end