Commit 9d7971c1 authored by Mehdi Lahmam's avatar Mehdi Lahmam

Remove unused `IssuesHelper#merge_requests_sentence`

Its last usage has been removed at eb3e7bdf.
parent 39b313ba
...@@ -86,14 +86,6 @@ module IssuesHelper ...@@ -86,14 +86,6 @@ module IssuesHelper
return 'hidden' if issue.closed? == closed return 'hidden' if issue.closed? == closed
end end
def merge_requests_sentence(merge_requests)
# Sorting based on the `!123` or `group/project!123` reference will sort
# local merge requests first.
merge_requests.map do |merge_request|
merge_request.to_reference(@project)
end.sort.to_sentence(last_word_connector: ', or ')
end
def confidential_icon(issue) def confidential_icon(issue)
icon('eye-slash') if issue.confidential? icon('eye-slash') if issue.confidential?
end end
......
...@@ -58,16 +58,6 @@ describe IssuesHelper do ...@@ -58,16 +58,6 @@ describe IssuesHelper do
end end
end end
describe "merge_requests_sentence" do
subject { merge_requests_sentence(merge_requests)}
let(:merge_requests) do
[build(:merge_request, iid: 1), build(:merge_request, iid: 2),
build(:merge_request, iid: 3)]
end
it { is_expected.to eq("!1, !2, or !3") }
end
describe '#award_user_list' do describe '#award_user_list' do
it "returns a comma-separated list of the first X users" do it "returns a comma-separated list of the first X users" do
user = build_stubbed(:user, name: 'Joe') user = build_stubbed(:user, name: 'Joe')
......
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