diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-03-18 15:07:23 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-03-18 15:07:23 +0000 |
commit | 0b878def9bad1c36ea2b23380a77f9eedaaa6b83 (patch) | |
tree | eb44c34bf05b2dbb1371d8553a7bb7b3d8a1989d /spec/mailers | |
parent | bdb1e64a7d620c203e5228717b7c464554b85f55 (diff) | |
download | gitlab-ce-0b878def9bad1c36ea2b23380a77f9eedaaa6b83.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/mailers')
-rw-r--r-- | spec/mailers/emails/profile_spec.rb | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/spec/mailers/emails/profile_spec.rb b/spec/mailers/emails/profile_spec.rb index 1c4e4a670b4..88efdbd77be 100644 --- a/spec/mailers/emails/profile_spec.rb +++ b/spec/mailers/emails/profile_spec.rb @@ -416,4 +416,27 @@ RSpec.describe Emails::Profile do is_expected.to have_body_text /#{profile_two_factor_auth_path}/ end end + + describe 'added a new email address' do + let_it_be(:user) { create(:user) } + let_it_be(:email) { create(:email, user: user) } + + subject { Notify.new_email_address_added_email(user, email) } + + it_behaves_like 'an email sent from GitLab' + it_behaves_like 'it should not have Gmail Actions links' + it_behaves_like 'a user cannot unsubscribe through footer link' + + it 'is sent to the user' do + is_expected.to deliver_to user.email + end + + it 'has the correct subject' do + is_expected.to have_subject /^New email address added$/i + end + + it 'includes a link to the email address page' do + is_expected.to have_body_text /#{profile_emails_path}/ + end + end end |