X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/c11142d5c0bd0fc2958f65225dde9243f1d00b12..3b56c005ebac1e5aaef8890057767e1955bb4948:/test/controllers/users_controller_test.rb?ds=sidebyside diff --git a/test/controllers/users_controller_test.rb b/test/controllers/users_controller_test.rb index 1cd9c5dda..bffcfe5bd 100644 --- a/test/controllers/users_controller_test.rb +++ b/test/controllers/users_controller_test.rb @@ -814,7 +814,7 @@ class UsersControllerTest < ActionDispatch::IntegrationTest assert_difference "ActionMailer::Base.deliveries.size", 1 do perform_enqueued_jobs do - post user_forgot_password_path, :params => { :user => { :email => user.email } } + post user_forgot_password_path, :params => { :email => user.email } end end assert_response :redirect @@ -829,7 +829,7 @@ class UsersControllerTest < ActionDispatch::IntegrationTest # that has the same address in a different case assert_difference "ActionMailer::Base.deliveries.size", 1 do perform_enqueued_jobs do - post user_forgot_password_path, :params => { :user => { :email => user.email.upcase } } + post user_forgot_password_path, :params => { :email => user.email.upcase } end end assert_response :redirect @@ -844,7 +844,7 @@ class UsersControllerTest < ActionDispatch::IntegrationTest # for more than one user but not an exact match for either assert_no_difference "ActionMailer::Base.deliveries.size" do perform_enqueued_jobs do - post user_forgot_password_path, :params => { :user => { :email => user.email.titlecase } } + post user_forgot_password_path, :params => { :email => user.email.titlecase } end end assert_response :success @@ -856,7 +856,7 @@ class UsersControllerTest < ActionDispatch::IntegrationTest third_user = create(:user) assert_difference "ActionMailer::Base.deliveries.size", 1 do perform_enqueued_jobs do - post user_forgot_password_path, :params => { :user => { :email => third_user.email } } + post user_forgot_password_path, :params => { :email => third_user.email } end end assert_response :redirect @@ -871,7 +871,7 @@ class UsersControllerTest < ActionDispatch::IntegrationTest # same (case insensitively unique) address in a different case assert_difference "ActionMailer::Base.deliveries.size", 1 do perform_enqueued_jobs do - post user_forgot_password_path, :params => { :user => { :email => third_user.email.upcase } } + post user_forgot_password_path, :params => { :email => third_user.email.upcase } end end assert_response :redirect @@ -906,7 +906,7 @@ class UsersControllerTest < ActionDispatch::IntegrationTest post user_reset_password_path, :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" + assert_select "div.invalid-feedback" # Test setting a new password post user_reset_password_path, :params => { :token => token.token, :user => { :pass_crypt => "new_password", :pass_crypt_confirmation => "new_password" } }