X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/7fd1e559383807dd0b509c7a08642f9d3a48616e..a70898be6dde1e9e9f61f90f8dc9b2c18a6f9287:/test/controllers/user_controller_test.rb diff --git a/test/controllers/user_controller_test.rb b/test/controllers/user_controller_test.rb index 1404fc795..1561a9ebe 100644 --- a/test/controllers/user_controller_test.rb +++ b/test/controllers/user_controller_test.rb @@ -749,6 +749,12 @@ class UserControllerTest < ActionController::TestCase assert_response :success assert_template :reset_password + # Test that errors are reported for erroneous submissions + post :reset_password, :params => { :token => token.token, :user => { :pass_crypt => "new_password", :pass_crypt_confirmation => "different_password" } } + assert_response :success + assert_template :reset_password + assert_select "div#errorExplanation" + # Test setting a new password post :reset_password, :params => { :token => token.token, :user => { :pass_crypt => "new_password", :pass_crypt_confirmation => "new_password" } } assert_response :redirect