Browse Source

Remove flash alert from reset password page

pull/158/head
baarkerlounger 3 years ago
parent
commit
2f76c06670
  1. 1
      app/controllers/auth/passwords_controller.rb
  2. 7
      spec/features/user_spec.rb

1
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

7
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

Loading…
Cancel
Save