Fix merge request unmergeable notification email plural interpolation

This commit is contained in:
Mark Chao 2018-05-26 12:39:20 +08:00
parent de12348ee8
commit 180685be97
3 changed files with 3 additions and 3 deletions

View file

@ -1,5 +1,5 @@
%p
Merge Request #{link_to @merge_request.to_reference, project_merge_request_url(@merge_request.target_project, @merge_request)} can no longer be merged due to the following #{pluralize(@reasons, 'reason')}:
Merge Request #{link_to @merge_request.to_reference, project_merge_request_url(@merge_request.target_project, @merge_request)} can no longer be merged due to the following #{'reason'.pluralize(@reasons.count)}:
%ul
- @reasons.each do |reason|

View file

@ -1,4 +1,4 @@
Merge Request #{@merge_request.to_reference} can no longer be merged due to the following #{pluralize(@reasons, 'reason')}:
Merge Request #{@merge_request.to_reference} can no longer be merged due to the following #{'reason'.pluralize(@reasons.count)}:
- @reasons.each do |reason|
* #{reason}

View file

@ -422,7 +422,7 @@ describe Notify 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('reasons:')
is_expected.to have_body_text('following reasons:')
reasons.each do |reason|
is_expected.to have_body_text(reason)
end