Commit 62ce457e authored by Rémy Coutable's avatar Rémy Coutable

Don't try to show assignee in approved_merge_request_email if there's no assignee

Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent 50370d88
......@@ -121,6 +121,8 @@
%td{ style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:15px;line-height:1.4;vertical-align:middle;" }
%a.muted{ href: user_url(@merge_request.author), style: "color:#333333;text-decoration:none;" }
= @merge_request.author.name
- if @merge_request.assignee
%tr
%td{ style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:15px;line-height:1.4;color:#8c8c8c;font-weight:300;padding:14px 0;margin:0;border-top:1px solid #ededed;" } Assignee
%td{ style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:15px;line-height:1.4;color:#8c8c8c;font-weight:300;padding:14px 0;margin:0;color:#333333;font-weight:400;width:75%;padding-left:5px;border-top:1px solid #ededed;" }
......
---
title: Don't try to show assignee in approved_merge_request_email if there's no assignee
merge_request:
author:
......@@ -403,6 +403,16 @@ describe Notify do
is_expected.to have_body_text /#{merge_request.assignee.name}/
is_expected.to have_body_text /#{last_approver.name}/
end
context 'when merge request has no assignee' do
before do
merge_request.update(assignee: nil)
end
it 'does not show the assignee' do
is_expected.not_to have_body_text 'Assignee'
end
end
end
describe 'that are unapproved' do
......
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