Skip to content

Commit

Permalink
Set correct form attribute in reset_password_live_test (#5522)
Browse files Browse the repository at this point in the history
Currently, the form submits "confirmation_password", which (I believe) could lead to false positives. Instead, this template should use the expected key, "password_confirmation".
  • Loading branch information
jclem committed Jul 17, 2023
1 parent 0d38dc0 commit a273232
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion priv/templates/phx.gen.auth/reset_password_live_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web
lv
|> element("#reset_password_form")
|> render_change(
<%= schema.singular %>: %{"password" => "secret12", "confirmation_password" => "secret123456"}
<%= schema.singular %>: %{"password" => "secret12", "password_confirmation" => "secret123456"}
)

assert result =~ "should be at least 12 character"
Expand Down

0 comments on commit a273232

Please sign in to comment.