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