X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=test%2Fsupport%2Fconn_case.ex;h=d25c28f49a85e0c533f77d051cdc84d9be1b93ea;hb=ef6829382aa32c03cf8536422537a9c219bd0035;hp=a83ef3b3ab96894d2d06b3620d41cb53eb62eea0;hpb=32ae9188430349e22721b81baec825b3cebfe8e5;p=akkoma diff --git a/test/support/conn_case.ex b/test/support/conn_case.ex index a83ef3b3a..d25c28f49 100644 --- a/test/support/conn_case.ex +++ b/test/support/conn_case.ex @@ -19,6 +19,7 @@ defmodule Pleroma.Web.ConnCase do quote do # Import conveniences for testing with connections use Phoenix.ConnTest + use Pleroma.Tests.Helpers import Pleroma.Web.Router.Helpers # The default endpoint for testing @@ -26,14 +27,14 @@ defmodule Pleroma.Web.ConnCase do end end - setup tags do Cachex.clear(:user_cache) :ok = Ecto.Adapters.SQL.Sandbox.checkout(Pleroma.Repo) + unless tags[:async] do Ecto.Adapters.SQL.Sandbox.mode(Pleroma.Repo, {:shared, self()}) end + {:ok, conn: Phoenix.ConnTest.build_conn()} end - end