password resets: fix exception when given user does not exist.

This commit is contained in:
evazion
2020-03-31 19:25:23 -05:00
parent 25776a062c
commit 3051daf5eb
2 changed files with 10 additions and 1 deletions

View File

@@ -25,6 +25,12 @@ class PasswordResetsControllerTest < ActionDispatch::IntegrationTest
assert_redirected_to @user
assert_no_enqueued_emails
end
should "fail if the user does not exist" do
post password_reset_path, params: { user: { name: "qoi23oti" } }
assert_redirected_to password_reset_path
end
end
end
end