From bf69f2da7bf3f0add0e5f9faff62099c17f6d74a Mon Sep 17 00:00:00 2001 From: Kat Date: Thu, 19 Sep 2024 08:57:30 +0100 Subject: [PATCH] Update pending_email_change_banner_text and test descriptions --- app/helpers/user_helper.rb | 2 +- spec/helpers/user_helper_spec.rb | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/helpers/user_helper.rb b/app/helpers/user_helper.rb index 0fdd0d1e5..bbcb0acae 100644 --- a/app/helpers/user_helper.rb +++ b/app/helpers/user_helper.rb @@ -71,7 +71,7 @@ module UserHelper def pending_email_change_banner_text(current_user) text = "A confirmation link has been sent to the new email address. The current email will continue to work until the change is confirmed." - text += " Deactivating this user will cancel the email change request." if current_user.support? + text += " Deactivating this user will cancel the email change request." if current_user.support? || current_user.data_coordinator? text end diff --git a/spec/helpers/user_helper_spec.rb b/spec/helpers/user_helper_spec.rb index da0436250..eb0a672db 100644 --- a/spec/helpers/user_helper_spec.rb +++ b/spec/helpers/user_helper_spec.rb @@ -114,7 +114,7 @@ RSpec.describe UserHelper do end end - context "when the user doesn't has the same unconfirmed email as current email" do + context "when the user has the same unconfirmed email as current email" do let(:user) { FactoryBot.create(:user, :data_provider, unconfirmed_email: "updated_email@example.com", email: "updated_email@example.com") } it "does not display pending email change banner" do @@ -122,7 +122,7 @@ RSpec.describe UserHelper do end end - context "when the user doesn't has a different unconfirmed email" do + context "when the user has a different unconfirmed email" do let(:user) { FactoryBot.create(:user, :data_provider, unconfirmed_email: "updated_email@example.com", email: "old_email@example.com") } it "displays pending email change banner" do @@ -192,7 +192,7 @@ RSpec.describe UserHelper do end describe "pending_email_change_banner_text" do - context "with non support user" do + context "with provider user" do let(:user) { FactoryBot.create(:user, :data_provider) } it "returns the correct text" do