From 2f76c06670b034611598d14296ec2c148c8d6f87 Mon Sep 17 00:00:00 2001 From: baarkerlounger Date: Thu, 9 Dec 2021 10:27:34 +0000 Subject: [PATCH] Remove flash alert from reset password page --- app/controllers/auth/passwords_controller.rb | 1 - spec/features/user_spec.rb | 7 ------- 2 files changed, 8 deletions(-) diff --git a/app/controllers/auth/passwords_controller.rb b/app/controllers/auth/passwords_controller.rb index 317c4aa29..6c05debb5 100644 --- a/app/controllers/auth/passwords_controller.rb +++ b/app/controllers/auth/passwords_controller.rb @@ -11,7 +11,6 @@ class Auth::PasswordsController < Devise::PasswordsController resource.errors.add :email, "Enter an email address in the correct format, like name@example.com" render "devise/passwords/new", status: :unprocessable_entity else - flash[:notice] = "Reset password instructions have been sent to #{@email}" render "devise/confirmations/reset" end end diff --git a/spec/features/user_spec.rb b/spec/features/user_spec.rb index 7b8351013..f14cd43fd 100644 --- a/spec/features/user_spec.rb +++ b/spec/features/user_spec.rb @@ -72,13 +72,6 @@ RSpec.describe "User Features" do fill_in("user[email]", with: user.email) expect { click_button("Send email") }.to change { ActionMailer::Base.deliveries.count }.by(1) end - - it " is shown the password reset confirmation page and successful flash message shows" do - visit("/users/password/new") - fill_in("user[email]", with: user.email) - click_button("Send email") - expect(page).to have_css ".govuk-notification-banner.govuk-notification-banner--success" - end end context "If user not logged in" do