X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/fad9a10dc26dc6e200fc3d18f23a31c7f36306bb..bcf5782fb5a3a916ea036ce78ecd2a1208ace87f:/test/controllers/passwords_controller_test.rb?ds=sidebyside diff --git a/test/controllers/passwords_controller_test.rb b/test/controllers/passwords_controller_test.rb index 24d3f1893..07f108cd7 100644 --- a/test/controllers/passwords_controller_test.rb +++ b/test/controllers/passwords_controller_test.rb @@ -49,7 +49,6 @@ class PasswordsControllerTest < ActionDispatch::IntegrationTest post user_forgot_password_path, :params => { :email => user.email } end end - assert_response :redirect assert_redirected_to login_path assert_match(/^If your email address exists/, flash[:notice]) email = ActionMailer::Base.deliveries.first @@ -64,7 +63,6 @@ class PasswordsControllerTest < ActionDispatch::IntegrationTest end end # Be paranoid about revealing there was no match - assert_response :redirect assert_redirected_to login_path assert_match(/^If your email address exists/, flash[:notice]) @@ -75,7 +73,6 @@ class PasswordsControllerTest < ActionDispatch::IntegrationTest post user_forgot_password_path, :params => { :email => user.email.upcase } end end - assert_response :redirect assert_redirected_to login_path assert_match(/^If your email address exists/, flash[:notice]) email = ActionMailer::Base.deliveries.first @@ -91,7 +88,6 @@ class PasswordsControllerTest < ActionDispatch::IntegrationTest end end # Be paranoid about revealing there was no match - assert_response :redirect assert_redirected_to login_path assert_match(/^If your email address exists/, flash[:notice]) @@ -103,7 +99,6 @@ class PasswordsControllerTest < ActionDispatch::IntegrationTest post user_forgot_password_path, :params => { :email => third_user.email } end end - assert_response :redirect assert_redirected_to login_path assert_match(/^If your email address exists/, flash[:notice]) email = ActionMailer::Base.deliveries.first @@ -118,13 +113,11 @@ class PasswordsControllerTest < ActionDispatch::IntegrationTest post user_forgot_password_path, :params => { :email => third_user.email.upcase } end end - assert_response :redirect assert_redirected_to login_path assert_match(/^If your email address exists/, flash[:notice]) email = ActionMailer::Base.deliveries.first assert_equal 1, email.to.count assert_equal third_user.email, email.to.first - ActionMailer::Base.deliveries.clear end def test_reset_password @@ -135,7 +128,6 @@ class PasswordsControllerTest < ActionDispatch::IntegrationTest # Test a request with a bogus token get user_reset_password_path, :params => { :token => "made_up_token" } - assert_response :redirect assert_redirected_to :action => :new # Create a valid token for a user @@ -154,7 +146,6 @@ class PasswordsControllerTest < ActionDispatch::IntegrationTest # Test setting a new password post user_reset_password_path, :params => { :token => token, :user => { :pass_crypt => "new_password", :pass_crypt_confirmation => "new_password" } } - assert_response :redirect assert_redirected_to root_path assert_equal user.id, session[:user] user.reload