Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
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) }