diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-04-20 13:00:54 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-04-20 13:00:54 +0300 |
commit | 3cccd102ba543e02725d247893729e5c73b38295 (patch) | |
tree | f36a04ec38517f5deaaacb5acc7d949688d1e187 /spec/mailers/emails/profile_spec.rb | |
parent | 205943281328046ef7b4528031b90fbda70c75ac (diff) |
Add latest changes from gitlab-org/gitlab@14-10-stable-eev14.10.0-rc42
Diffstat (limited to 'spec/mailers/emails/profile_spec.rb')
-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 87776457473..f4483f7e8f5 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 |