From fe661a935ac887b11aec31ff049ace2db7ccbf84 Mon Sep 17 00:00:00 2001 From: Simponic Date: Mon, 19 Dec 2022 16:27:34 -0700 Subject: Add unsupported message for DSA keys, player and such --- test/support/repo_case.ex | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 test/support/repo_case.ex (limited to 'test/support') diff --git a/test/support/repo_case.ex b/test/support/repo_case.ex new file mode 100644 index 0000000..73abcff --- /dev/null +++ b/test/support/repo_case.ex @@ -0,0 +1,25 @@ +defmodule Chessh.RepoCase do + use ExUnit.CaseTemplate + + using do + quote do + alias Chessh.Repo + + import Ecto + import Ecto.Query + import Chessh.RepoCase + + # and any other stuff + end + end + + setup tags do + :ok = Ecto.Adapters.SQL.Sandbox.checkout(Chessh.Repo) + + unless tags[:async] do + Ecto.Adapters.SQL.Sandbox.mode(Chessh.Repo, {:shared, self()}) + end + + :ok + end +end -- cgit v1.2.3-70-g09d2