summaryrefslogtreecommitdiff
path: root/test/support
diff options
context:
space:
mode:
authorSimponic <loganhunt@simponic.xyz>2022-12-19 16:27:34 -0700
committerSimponic <loganhunt@simponic.xyz>2022-12-19 16:27:34 -0700
commitfe661a935ac887b11aec31ff049ace2db7ccbf84 (patch)
tree13fdbe8757d929671f7006c20181a4b8febc83ce /test/support
parentb4743f9efb685545cdd780cc9ba7a50e083dd8cf (diff)
downloadchessh-fe661a935ac887b11aec31ff049ace2db7ccbf84.tar.gz
chessh-fe661a935ac887b11aec31ff049ace2db7ccbf84.zip
Add unsupported message for DSA keys, player and such
Diffstat (limited to 'test/support')
-rw-r--r--test/support/repo_case.ex25
1 files changed, 25 insertions, 0 deletions
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