X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;f=test%2Fsupport%2Fconn_case.ex;h=f20e3d955e33dafcdd1728da1bc24d4372b3e4df;hb=ad7998361498b08d45ea0971f8b6ecbd8ca0740e;hp=b5bd71809a195089fc1fbc098721154d83733346;hpb=c1129ff6746b20b164b7bc6dadf851f396ef29ad;p=akkoma diff --git a/test/support/conn_case.ex b/test/support/conn_case.ex index b5bd71809..f20e3d955 100644 --- a/test/support/conn_case.ex +++ b/test/support/conn_case.ex @@ -118,8 +118,13 @@ defmodule Pleroma.Web.ConnCase 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 @@ -131,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