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/channel_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/channel_case.ex')
-rw-r--r-- | test/support/channel_case.ex | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/test/support/channel_case.ex b/test/support/channel_case.ex index 114184a9f..f4696adb3 100644 --- a/test/support/channel_case.ex +++ b/test/support/channel_case.ex @@ -33,8 +33,14 @@ defmodule Pleroma.Web.ChannelCase 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 :ok |