diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-20 17:34:42 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-20 17:34:42 +0300 |
commit | 9f46488805e86b1bc341ea1620b866016c2ce5ed (patch) | |
tree | f9748c7e287041e37d6da49e0a29c9511dc34768 /spec/mailers/notify_spec.rb | |
parent | dfc92d081ea0332d69c8aca2f0e745cb48ae5e6d (diff) |
Add latest changes from gitlab-org/gitlab@13-0-stable-ee
Diffstat (limited to 'spec/mailers/notify_spec.rb')
-rw-r--r-- | spec/mailers/notify_spec.rb | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/spec/mailers/notify_spec.rb b/spec/mailers/notify_spec.rb index d21efe2e1fe..3c66902bb2e 100644 --- a/spec/mailers/notify_spec.rb +++ b/spec/mailers/notify_spec.rb @@ -70,6 +70,7 @@ describe Notify do it_behaves_like 'an email starting a new thread with reply-by-email enabled' do let(:model) { issue } end + it_behaves_like 'it should show Gmail Actions View Issue link' it_behaves_like 'an unsubscribeable thread' it_behaves_like 'appearance header and footer enabled' @@ -116,6 +117,7 @@ describe Notify do it_behaves_like 'an answer to an existing thread with reply-by-email enabled' do let(:model) { issue } end + it_behaves_like 'it should show Gmail Actions View Issue link' it_behaves_like 'an unsubscribeable thread' it_behaves_like 'appearance header and footer enabled' @@ -155,6 +157,7 @@ describe Notify do it_behaves_like 'an answer to an existing thread with reply-by-email enabled' do let(:model) { issue } end + it_behaves_like 'it should show Gmail Actions View Issue link' it_behaves_like 'a user cannot unsubscribe through footer link' it_behaves_like 'an email with a labels subscriptions link in its footer' @@ -200,6 +203,7 @@ describe Notify do it_behaves_like 'an answer to an existing thread with reply-by-email enabled' do let(:model) { issue } end + it_behaves_like 'it should show Gmail Actions View Issue link' it_behaves_like 'an unsubscribeable thread' it_behaves_like 'appearance header and footer enabled' @@ -214,6 +218,7 @@ describe Notify do it_behaves_like 'an answer to an existing thread with reply-by-email enabled' do let(:model) { issue } end + it_behaves_like 'it should show Gmail Actions View Issue link' it_behaves_like 'an unsubscribeable thread' it_behaves_like 'appearance header and footer enabled' @@ -248,6 +253,7 @@ describe Notify do it_behaves_like 'an answer to an existing thread with reply-by-email enabled' do let(:model) { issue } end + it_behaves_like 'it should show Gmail Actions View Issue link' it_behaves_like 'an unsubscribeable thread' @@ -300,6 +306,7 @@ describe Notify do it_behaves_like 'an email starting a new thread with reply-by-email enabled' do let(:model) { merge_request } end + it_behaves_like 'it should show Gmail Actions View Merge request link' it_behaves_like 'an unsubscribeable thread' it_behaves_like 'appearance header and footer enabled' @@ -344,6 +351,7 @@ describe Notify do it_behaves_like 'an answer to an existing thread with reply-by-email enabled' do let(:model) { merge_request } end + it_behaves_like 'it should show Gmail Actions View Merge request link' it_behaves_like "an unsubscribeable thread" it_behaves_like 'appearance header and footer enabled' @@ -409,6 +417,7 @@ describe Notify do it_behaves_like 'an answer to an existing thread with reply-by-email enabled' do let(:model) { merge_request } end + it_behaves_like 'it should show Gmail Actions View Merge request link' it_behaves_like 'a user cannot unsubscribe through footer link' it_behaves_like 'an email with a labels subscriptions link in its footer' @@ -436,6 +445,7 @@ describe Notify do it_behaves_like 'an answer to an existing thread with reply-by-email enabled' do let(:model) { merge_request } end + it_behaves_like 'it should show Gmail Actions View Merge request link' it_behaves_like 'an unsubscribeable thread' it_behaves_like 'appearance header and footer enabled' @@ -466,6 +476,7 @@ describe Notify do it_behaves_like 'an answer to an existing thread with reply-by-email enabled' do let(:model) { merge_request } end + it_behaves_like 'it should show Gmail Actions View Merge request link' it_behaves_like 'an unsubscribeable thread' it_behaves_like 'appearance header and footer enabled' @@ -502,6 +513,7 @@ describe Notify do it_behaves_like 'an answer to an existing thread with reply-by-email enabled' do let(:model) { merge_request } end + it_behaves_like 'it should show Gmail Actions View Merge request link' it_behaves_like 'an unsubscribeable thread' it_behaves_like 'appearance header and footer enabled' @@ -533,6 +545,7 @@ describe Notify do it_behaves_like 'an answer to an existing thread with reply-by-email enabled' do let(:model) { merge_request } end + it_behaves_like 'it should show Gmail Actions View Merge request link' it_behaves_like 'an unsubscribeable thread' it_behaves_like 'appearance header and footer enabled' @@ -694,6 +707,7 @@ describe Notify do it_behaves_like 'an answer to an existing thread with reply-by-email enabled' do let(:model) { project_snippet } end + it_behaves_like 'a user cannot unsubscribe through footer link' it 'has the correct subject' do @@ -712,6 +726,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 } @@ -913,6 +950,7 @@ describe Notify do it_behaves_like 'an answer to an existing thread with reply-by-email enabled' do let(:model) { commit } end + it_behaves_like 'it should show Gmail Actions View Commit link' it_behaves_like 'a user cannot unsubscribe through footer link' it_behaves_like 'appearance header and footer enabled' @@ -939,6 +977,7 @@ describe Notify do it_behaves_like 'an answer to an existing thread with reply-by-email enabled' do let(:model) { merge_request } end + it_behaves_like 'it should show Gmail Actions View Merge request link' it_behaves_like 'an unsubscribeable thread' it_behaves_like 'appearance header and footer enabled' @@ -965,6 +1004,7 @@ describe Notify do it_behaves_like 'an answer to an existing thread with reply-by-email enabled' do let(:model) { issue } end + it_behaves_like 'it should show Gmail Actions View Issue link' it_behaves_like 'an unsubscribeable thread' it_behaves_like 'appearance header and footer enabled' @@ -1037,6 +1077,7 @@ describe Notify do it_behaves_like 'an answer to an existing thread with reply-by-email enabled' do let(:model) { commit } end + it_behaves_like 'it should show Gmail Actions View Commit link' it_behaves_like 'a user cannot unsubscribe through footer link' it_behaves_like 'appearance header and footer enabled' @@ -1069,6 +1110,7 @@ describe Notify do it_behaves_like 'an answer to an existing thread with reply-by-email enabled' do let(:model) { merge_request } end + it_behaves_like 'it should show Gmail Actions View Merge request link' it_behaves_like 'an unsubscribeable thread' it_behaves_like 'appearance header and footer enabled' @@ -1101,6 +1143,7 @@ describe Notify do it_behaves_like 'an answer to an existing thread with reply-by-email enabled' do let(:model) { issue } end + it_behaves_like 'it should show Gmail Actions View Issue link' it_behaves_like 'an unsubscribeable thread' it_behaves_like 'appearance header and footer enabled' |