Fix ClosingIssueExtractor specs
This commit is contained in:
parent
5a9c5520d9
commit
2c1bf71793
1 changed files with 5 additions and 5 deletions
|
@ -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])
|
||||
|
|
Loading…
Reference in a new issue