diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-12 03:10:11 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-12 03:10:11 +0300 |
commit | c6f0b221b71133792f2c9e5a026f3744c16d5ef5 (patch) | |
tree | 864e5737806d454fbf23c681d5bced9b3e4a7d77 /spec/mailers | |
parent | 3f45eb27e9586ad87682c2d125770e119a7e9fe0 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/mailers')
-rw-r--r-- | spec/mailers/notify_spec.rb | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/spec/mailers/notify_spec.rb b/spec/mailers/notify_spec.rb index d21efe2e1fe..6e1dba6945d 100644 --- a/spec/mailers/notify_spec.rb +++ b/spec/mailers/notify_spec.rb @@ -712,6 +712,29 @@ describe Notify do end end + describe 'for design notes' do + let_it_be(:design) { create(:design, :with_file) } + let_it_be(:recipient) { create(:user) } + let_it_be(:note) do + create(:diff_note_on_design, + noteable: design, + note: "Hello #{recipient.to_reference}") + end + + let(:header_name) { 'X-Gitlab-DesignManagement-Design-ID' } + let(:refer_to_design) do + have_attributes(subject: a_string_including(design.filename)) + end + + subject { described_class.note_design_email(recipient.id, note.id) } + + it { is_expected.to have_header(header_name, design.id.to_s) } + + it { is_expected.to have_body_text(design.filename) } + + it { is_expected.to refer_to_design } + end + describe 'project was moved' do let(:recipient) { user } |