X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/3d3b2b47964ec91ef1ab1946b7258a06665caced..c446ca287b7dfa79cf1722ffe950f9a38e4f74d3:/test/controllers/confirmations_controller_test.rb diff --git a/test/controllers/confirmations_controller_test.rb b/test/controllers/confirmations_controller_test.rb index 774efdb9c..f7c99a0c6 100644 --- a/test/controllers/confirmations_controller_test.rb +++ b/test/controllers/confirmations_controller_test.rb @@ -204,8 +204,6 @@ class UsersControllerTest < ActionDispatch::IntegrationTest email = ActionMailer::Base.deliveries.last assert_equal user.email, email.to.first - - ActionMailer::Base.deliveries.clear end def test_confirm_resend_deleted @@ -250,7 +248,7 @@ class UsersControllerTest < ActionDispatch::IntegrationTest confirm_string = user.generate_token_for(:new_email) post user_confirm_email_path, :params => { :confirm_string => confirm_string } - assert_redirected_to edit_account_path + assert_redirected_to account_path assert_match(/Confirmed your change of email address/, flash[:notice]) end @@ -259,13 +257,13 @@ class UsersControllerTest < ActionDispatch::IntegrationTest confirm_string = user.generate_token_for(:new_email) post user_confirm_email_path, :params => { :confirm_string => confirm_string } - assert_redirected_to edit_account_path + assert_redirected_to account_path assert_match(/already been confirmed/, flash[:error]) end def test_confirm_email_bad_token post user_confirm_email_path, :params => { :confirm_string => "XXXXX" } - assert_redirected_to edit_account_path + assert_redirected_to account_path assert_match(/confirmation code has expired or does not exist/, flash[:error]) end @@ -281,7 +279,7 @@ class UsersControllerTest < ActionDispatch::IntegrationTest # precondition gravatar should be turned off assert_not user.image_use_gravatar post user_confirm_email_path, :params => { :confirm_string => confirm_string } - assert_redirected_to edit_account_path + assert_redirected_to account_path assert_match(/Confirmed your change of email address/, flash[:notice]) # gravatar use should now be enabled assert User.find(user.id).image_use_gravatar @@ -295,7 +293,7 @@ class UsersControllerTest < ActionDispatch::IntegrationTest # precondition gravatar should be turned on assert user.image_use_gravatar post user_confirm_email_path, :params => { :confirm_string => confirm_string } - assert_redirected_to edit_account_path + assert_redirected_to account_path assert_match(/Confirmed your change of email address/, flash[:notice]) # gravatar use should now be disabled assert_not User.find(user.id).image_use_gravatar