summaryrefslogtreecommitdiff
path: root/spec/helpers/users_helper_spec.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-08-12 00:09:35 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-08-12 00:09:35 +0000
commitfaedfbb4733019a8c802af115a29f67ff9c8fdae (patch)
treee6bba001ba4343c34ed8a7c6d34791cea8ad0adb /spec/helpers/users_helper_spec.rb
parent0f079aa28d93f40ad7fda398fb2280c3e358098d (diff)
downloadgitlab-ce-faedfbb4733019a8c802af115a29f67ff9c8fdae.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/helpers/users_helper_spec.rb')
-rw-r--r--spec/helpers/users_helper_spec.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/spec/helpers/users_helper_spec.rb b/spec/helpers/users_helper_spec.rb
index 88030299574..78a15f52be5 100644
--- a/spec/helpers/users_helper_spec.rb
+++ b/spec/helpers/users_helper_spec.rb
@@ -421,6 +421,25 @@ RSpec.describe UsersHelper do
end
end
+ describe '#user_email_help_text' do
+ subject(:user_email_help_text) { helper.user_email_help_text(user) }
+
+ context 'when `user.unconfirmed_email` is not set' do
+ it 'contains avatar detection text' do
+ expect(user_email_help_text).to include _('We also use email for avatar detection if no avatar is uploaded.')
+ end
+ end
+
+ context 'when `user.unconfirmed_email` is set' do
+ let(:user) { create(:user, :unconfirmed, unconfirmed_email: 'foo@bar.com') }
+
+ it 'contains resend confirmation e-mail text' do
+ expect(user_email_help_text).to include _('Resend confirmation e-mail')
+ expect(user_email_help_text).to include _('Please click the link in the confirmation email before continuing. It was sent to ')
+ end
+ end
+ end
+
describe '#admin_user_actions_data_attributes' do
subject(:data) { helper.admin_user_actions_data_attributes(user) }