Skip to content

Commit

Permalink
test redirect to password form when invalid, #16
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonLab committed May 15, 2020
1 parent cef160a commit fb99b83
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/auth_web/controllers/auth_controller_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,18 @@ defmodule AuthWeb.AuthControllerTest do
assert html_response(conn, 200) =~ "Welcome"
end

test "password_create/2 display form when password not valid", %{conn: conn} do
params = %{
"person" => %{
"email" => AuthWeb.ApikeyController.encrypt_encode("anabela@mail.com"),
"password" => "short"
}
}

conn = post(conn, "/auth/password/create", params)
assert html_response(conn, 200) =~ "Password"
end

test "verify_email/2 verify an email address", %{conn: conn} do
person =
%{email: "anabela@mail.com", auth_provider: "email"}
Expand Down

0 comments on commit fb99b83

Please sign in to comment.