summaryrefslogtreecommitdiff
path: root/test/auth
diff options
context:
space:
mode:
authorSimponic <loganhunt@simponic.xyz>2022-12-30 05:46:35 -0700
committerSimponic <loganhunt@simponic.xyz>2022-12-30 05:46:35 -0700
commit42425b02260d279cd9c12fb3e625282979b9e308 (patch)
tree0412bf9f39d44266cff94082c499e44e5f6e60f5 /test/auth
parent60eea1b4ed65bc7cfce1e383dac6de9d004540eb (diff)
downloadchessh-42425b02260d279cd9c12fb3e625282979b9e308.tar.gz
chessh-42425b02260d279cd9c12fb3e625282979b9e308.zip
Add scalable session thresholds
Diffstat (limited to 'test/auth')
-rw-r--r--test/auth/password_test.exs11
1 files changed, 10 insertions, 1 deletions
diff --git a/test/auth/password_test.exs b/test/auth/password_test.exs
index 8c93ea9..348032f 100644
--- a/test/auth/password_test.exs
+++ b/test/auth/password_test.exs
@@ -8,7 +8,7 @@ defmodule Chessh.Auth.PasswordAuthenticatorTest do
Ecto.Adapters.SQL.Sandbox.checkout(Repo)
Ecto.Adapters.SQL.Sandbox.mode(Repo, {:shared, self()})
- {:ok, _user} = Repo.insert(Player.registration_changeset(%Player{}, @valid_user))
+ {:ok, _player} = Repo.insert(Player.registration_changeset(%Player{}, @valid_user))
:ok
end
@@ -24,4 +24,13 @@ defmodule Chessh.Auth.PasswordAuthenticatorTest do
"a_bad_password"
)
end
+
+ test "Password can authenticate a user instance" do
+ player = Repo.get_by(Player, username: "logan")
+
+ assert Chessh.Auth.PasswordAuthenticator.authenticate(
+ player,
+ @valid_user.password
+ )
+ end
end