Commit 69f9c911 authored by George Tsiolis's avatar George Tsiolis

Add tests for non-comma-separated issue numbers in single line message

parent 3d1a2316
...@@ -379,6 +379,20 @@ describe Gitlab::ClosingIssueExtractor do ...@@ -379,6 +379,20 @@ describe Gitlab::ClosingIssueExtractor do
.to match_array([issue, other_issue, third_issue]) .to match_array([issue, other_issue, third_issue])
end end
it 'allows non-comma-separated issue numbers in single line message' do
message = "Closes #{reference} #{reference2} #{reference3}"
expect(subject.closed_by_message(message))
.to match_array([issue, other_issue, third_issue])
end
it 'allows mixed comma-separated and non-comma-separated issue numbers in single line message' do
message = "Closes #{reference}, #{reference2} and #{reference3}"
expect(subject.closed_by_message(message))
.to match_array([issue, other_issue, third_issue])
end
it 'fetches issues in multi-line message' do it 'fetches issues in multi-line message' do
message = "Awesome commit (closes #{reference})\nAlso fixes #{reference2}" message = "Awesome commit (closes #{reference})\nAlso fixes #{reference2}"
......
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