diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-03-11 03:09:38 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-03-11 03:09:38 +0300 |
commit | c8795e6bd0696a310ae172e338aa7f3b4a35bdc2 (patch) | |
tree | 2bea369915f361a25d7ff60bbe816d1bf41ff1c7 /spec/mailers/notify_spec.rb | |
parent | ea4de09f48b4d3aa9b32b3c21c9cc4f9e3b56797 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/mailers/notify_spec.rb')
-rw-r--r-- | spec/mailers/notify_spec.rb | 44 |
1 files changed, 5 insertions, 39 deletions
diff --git a/spec/mailers/notify_spec.rb b/spec/mailers/notify_spec.rb index 17ed3e967a1..399f6ff5576 100644 --- a/spec/mailers/notify_spec.rb +++ b/spec/mailers/notify_spec.rb @@ -365,7 +365,11 @@ RSpec.describe Notify do it 'contains a link to merge request author' do is_expected.to have_body_text merge_request.author_name - is_expected.to have_body_text 'created a merge request:' + is_expected.to have_body_text 'created a' + end + + it 'contains a link to the merge request url' do + is_expected.to have_link('merge request', href: project_merge_request_url(merge_request.target_project, merge_request)) end end @@ -464,44 +468,6 @@ RSpec.describe Notify do end end - describe 'that are unmergeable' do - let_it_be(:merge_request) do - create(:merge_request, :conflict, - source_project: project, - target_project: project, - author: current_user, - assignees: [assignee], - description: 'Awesome description') - end - - subject { described_class.merge_request_unmergeable_email(recipient.id, merge_request.id) } - - it_behaves_like 'a multiple recipients email' - 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' - it_behaves_like 'appearance header and footer not enabled' - - it 'is sent as the merge request author' do - sender = subject.header[:from].addrs[0] - expect(sender.display_name).to eq(merge_request.author.name) - expect(sender.address).to eq(gitlab_sender) - end - - it 'has the correct subject and body' do - aggregate_failures do - is_expected.to have_referable_subject(merge_request, reply: true) - is_expected.to have_body_text(project_merge_request_path(project, merge_request)) - is_expected.to have_body_text('due to conflict.') - is_expected.to have_link(merge_request.to_reference, href: project_merge_request_url(merge_request.target_project, merge_request)) - end - end - end - shared_examples 'a push to an existing merge request' do let(:push_user) { create(:user) } |