initial work on fixing user tests

This commit is contained in:
2021-10-11 16:20:57 +02:00
parent 6598455c39
commit 77f3dc4614
4 changed files with 18 additions and 15 deletions
@@ -86,7 +86,7 @@ defmodule PokemonCoutureWeb.UserResetPasswordControllerTest do
assert redirected_to(conn) == Routes.user_session_path(conn, :new)
refute get_session(conn, :user_token)
assert get_flash(conn, :info) =~ "Password reset successfully"
assert Accounts.get_user_by_email_and_password(user.email, "new valid password")
assert Accounts.get_user_by_username_and_password(user.username, "new valid password")
end
test "does not reset password on invalid data", %{conn: conn, token: token} do
@@ -35,7 +35,7 @@ defmodule PokemonCoutureWeb.UserSettingsControllerTest do
assert redirected_to(new_password_conn) == Routes.user_settings_path(conn, :edit)
assert get_session(new_password_conn, :user_token) != get_session(conn, :user_token)
assert get_flash(new_password_conn, :info) =~ "Password updated successfully"
assert Accounts.get_user_by_email_and_password(user.email, "new valid password")
assert Accounts.get_user_by_username_and_password(user.username, "new valid password")
end
test "does not update password on invalid data", %{conn: conn} do