From 66cf576d1f4141d8311a05c0c5c9ce9b1fa4d90e Mon Sep 17 00:00:00 2001 From: Matthew Phelan Date: Thu, 25 Nov 2021 16:24:40 +0000 Subject: [PATCH] sucessful flash test added --- spec/features/user_spec.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/spec/features/user_spec.rb b/spec/features/user_spec.rb index c9e8a17b4..9ea79708c 100644 --- a/spec/features/user_spec.rb +++ b/spec/features/user_spec.rb @@ -49,5 +49,12 @@ 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 end