diff options
author | Pierre de Lacroix <pierre@pdelacroix.com> | 2020-12-09 12:10:39 +0000 |
---|---|---|
committer | Pierre de Lacroix <pierre@pdelacroix.com> | 2020-12-09 12:10:39 +0000 |
commit | d189c923eb7e63fb7cb8c6dbd8816f7ca3b9384f (patch) | |
tree | db6fede8164782facfae767d970bdf5838ce92e6 /test/support/conn_case.ex | |
parent | update description (diff) | |
parent | fix tests in CI (diff) |
Merge branch 'repo_setup' into 'master'
Repo setup
See merge request kazarma/matrix_app_service.ex!13
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, "/", %{ |