Commit 16227137 authored by Miguel Rincon's avatar Miguel Rincon

Merge branch...

Merge branch '300750-add-missing-reviewers-information-to-new_mention_in_merge_request_email' into 'master'

Add reviewer information to new_mention_in_merge_request_email

See merge request gitlab-org/gitlab!56184
parents 2d3735bd c5789b87
......@@ -60,6 +60,10 @@ class NotifyPreview < ActionMailer::Preview
end
end
def new_mention_in_merge_request_email
Notify.new_mention_in_merge_request_email(user.id, issue.id, user.id).message
end
def closed_issue_email
Notify.closed_issue_email(user.id, issue.id, user.id).message
end
......
......@@ -4,6 +4,7 @@ You have been mentioned in Merge Request <%= @merge_request.to_reference %>
<%= merge_path_description(@merge_request, 'to') %>
Author: <%= sanitize_name(@merge_request.author_name) %>
= assignees_label(@merge_request)
<%= assignees_label(@merge_request) %>
<%= reviewers_label(@merge_request) %>
<%= @merge_request.description %>
---
title: Add reviewers detail to new mention in merge request email
merge_request: 56184
author:
type: added
......@@ -24,6 +24,23 @@ RSpec.describe Emails::MergeRequests do
let(:recipient) { assignee }
let(:current_user_sanitized) { 'www_example_com' }
describe '#new_mention_in_merge_request_email' do
subject { Notify.new_mention_in_merge_request_email(recipient.id, merge_request.id, current_user.id) }
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('You have been mentioned in Merge Request')
is_expected.to have_link(merge_request.to_reference, href: project_merge_request_url(merge_request.target_project, merge_request))
is_expected.to have_text_part_content(assignee.name)
is_expected.to have_text_part_content(reviewer.name)
is_expected.to have_html_part_content(assignee.name)
is_expected.to have_html_part_content(reviewer.name)
end
end
end
describe '#merge_request_unmergeable_email' do
subject { Notify.merge_request_unmergeable_email(recipient.id, merge_request.id) }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment