diff options
author | Alex Gleason <alex@alexgleason.me> | 2021-01-06 15:22:35 -0600 |
---|---|---|
committer | Alex Gleason <alex@alexgleason.me> | 2021-01-06 15:22:35 -0600 |
commit | 1438fd958325c3d469315c478f06def9e4dd0de3 (patch) | |
tree | 738e7e9ce8e0e0af89d9dff411191643cbf45aab /test/support/conn_case.ex | |
parent | 2aeb229de3f59e1704c633c31415e7e834f6ba67 (diff) | |
parent | 5e128a6be30563adc3b8a938aa68d18ac04cdfa0 (diff) | |
download | pleroma-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.ex | 14 |
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 |