summaryrefslogtreecommitdiff
path: root/test/auth/pubkey_test.exs
diff options
context:
space:
mode:
Diffstat (limited to 'test/auth/pubkey_test.exs')
-rw-r--r--test/auth/pubkey_test.exs9
1 files changed, 4 insertions, 5 deletions
diff --git a/test/auth/pubkey_test.exs b/test/auth/pubkey_test.exs
index 78eecfb..da2518b 100644
--- a/test/auth/pubkey_test.exs
+++ b/test/auth/pubkey_test.exs
@@ -1,8 +1,6 @@
defmodule Chessh.Auth.PublicKeyAuthenticatorTest do
use ExUnit.Case
- alias Chessh.Key
- alias Chessh.Repo
- alias Chessh.Player
+ alias Chessh.{Key, Repo, Player}
@valid_user %{username: "logan", password: "password"}
@valid_key %{
@@ -10,8 +8,9 @@ defmodule Chessh.Auth.PublicKeyAuthenticatorTest do
key: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJ/2LOJGGEd/dhFgRxJ5MMv0jJw4s4pA8qmMbZyulN44"
}
- setup do
- :ok = Ecto.Adapters.SQL.Sandbox.checkout(Chessh.Repo)
+ setup_all do
+ Ecto.Adapters.SQL.Sandbox.checkout(Repo)
+ Ecto.Adapters.SQL.Sandbox.mode(Repo, {:shared, self()})
{:ok, player} = Repo.insert(Player.registration_changeset(%Player{}, @valid_user))