diff options
author | Ivan Tashkinov <ivantashkinov@gmail.com> | 2020-12-26 22:23:05 +0300 |
---|---|---|
committer | Ivan Tashkinov <ivantashkinov@gmail.com> | 2020-12-26 22:23:05 +0300 |
commit | 4134abef63e1165f5701741c1012e64cb908654c (patch) | |
tree | bf531d2f464297c46edeaaf02e6966c1695934a5 /test/support/channel_case.ex | |
parent | cbb19d0e1882f5ce641f30b51d7156336f81aba9 (diff) | |
parent | e4f1d8f48c85b8a388d6c3945db157de5ce588c5 (diff) | |
download | pleroma-4134abef63e1165f5701741c1012e64cb908654c.tar.gz pleroma-4134abef63e1165f5701741c1012e64cb908654c.zip |
Merge remote-tracking branch 'remotes/origin/develop' into feature/object-hashtags-rework
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 |