diff options
| author | Simponic <loganhunt@simponic.xyz> | 2022-12-27 23:50:22 -0700 |
|---|---|---|
| committer | Simponic <loganhunt@simponic.xyz> | 2022-12-27 23:50:22 -0700 |
| commit | 10bc34245e8e1e3ba63fb0720d3bcfb1119db921 (patch) | |
| tree | 0158f37dcda36f36327e45c4ce7543e77c26c8a0 /test/auth/password_test.exs | |
| parent | f7c2ccbe26dc808e4a7eae9a378e6c382220961a (diff) | |
| download | chessh-10bc34245e8e1e3ba63fb0720d3bcfb1119db921.tar.gz chessh-10bc34245e8e1e3ba63fb0720d3bcfb1119db921.zip | |
Initial erlang stuff
Diffstat (limited to 'test/auth/password_test.exs')
| -rw-r--r-- | test/auth/password_test.exs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/test/auth/password_test.exs b/test/auth/password_test.exs index 974f2fa..1516bdf 100644 --- a/test/auth/password_test.exs +++ b/test/auth/password_test.exs @@ -1,11 +1,10 @@ defmodule Chessh.Auth.PasswordAuthenticatorTest do use ExUnit.Case - alias Chessh.Player - alias Chessh.Repo + alias Chessh.{Player, Repo} @valid_user %{username: "logan", password: "password"} - setup do + setup_all do :ok = Ecto.Adapters.SQL.Sandbox.checkout(Chessh.Repo) {:ok, _user} = Repo.insert(Player.registration_changeset(%Player{}, @valid_user)) @@ -13,7 +12,7 @@ defmodule Chessh.Auth.PasswordAuthenticatorTest do :ok end - test "User can sign in with their password" do + test "Password can authenticate a hashed password" do assert Chessh.Auth.PasswordAuthenticator.authenticate( String.to_charlist(@valid_user.username), String.to_charlist(@valid_user.password) |
