Commit 2c1bf717 authored by Robert Speicher's avatar Robert Speicher

Fix ClosingIssueExtractor specs

parent 5a9c5520
......@@ -137,28 +137,28 @@ describe Gitlab::ClosingIssueExtractor do
let(:reference3) { third_issue.to_reference }
it 'fetches issues in single line message' do
message = "Closes #{reference} and fix ##{reference2}"
message = "Closes #{reference} and fix #{reference2}"
expect(subject.closed_by_message(message)).
to eq([issue, other_issue])
end
it 'fetches comma-separated issues references in single line message' do
message = "Closes #{reference}, closes ##{reference2}"
message = "Closes #{reference}, closes #{reference2}"
expect(subject.closed_by_message(message)).
to eq([issue, other_issue])
end
it 'fetches comma-separated issues numbers in single line message' do
message = "Closes #{reference}, ##{reference2} and ##{reference3}"
message = "Closes #{reference}, #{reference2} and #{reference3}"
expect(subject.closed_by_message(message)).
to eq([issue, other_issue, third_issue])
end
it 'fetches issues in multi-line message' do
message = "Awesome commit (closes #{reference})\nAlso fixes ##{reference2}"
message = "Awesome commit (closes #{reference})\nAlso fixes #{reference2}"
expect(subject.closed_by_message(message)).
to eq([issue, other_issue])
......@@ -166,7 +166,7 @@ describe Gitlab::ClosingIssueExtractor do
it 'fetches issues in hybrid message' do
message = "Awesome commit (closes #{reference})\n"\
"Also fixing issues ##{reference2}, ##{reference3} and #4"
"Also fixing issues #{reference2}, #{reference3} and #4"
expect(subject.closed_by_message(message)).
to eq([issue, other_issue, third_issue])
......
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