diff options
Diffstat (limited to 'test/support/conn_case.ex')
-rw-r--r-- | test/support/conn_case.ex | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/support/conn_case.ex b/test/support/conn_case.ex index e1ce056..582801d 100644 --- a/test/support/conn_case.ex +++ b/test/support/conn_case.ex @@ -32,6 +32,12 @@ defmodule MatrixAppServiceWeb.ConnCase do end setup tags do + :ok = Ecto.Adapters.SQL.Sandbox.checkout(MatrixAppService.Repo) + + unless tags[:async] do + Ecto.Adapters.SQL.Sandbox.mode(MatrixAppService.Repo, {:shared, self()}) + end + conn = if tags[:authenticated] do Phoenix.ConnTest.build_conn(:get, "/", %{ |