Skip to content
Snippets Groups Projects
Commit 2c1bf717 authored by Robert Speicher's avatar Robert Speicher
Browse files

Fix ClosingIssueExtractor specs

parent 5a9c5520
No related branches found
No related tags found
No related merge requests found
Loading
@@ -137,28 +137,28 @@ describe Gitlab::ClosingIssueExtractor do
Loading
@@ -137,28 +137,28 @@ describe Gitlab::ClosingIssueExtractor do
let(:reference3) { third_issue.to_reference } let(:reference3) { third_issue.to_reference }
   
it 'fetches issues in single line message' do 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)). expect(subject.closed_by_message(message)).
to eq([issue, other_issue]) to eq([issue, other_issue])
end end
   
it 'fetches comma-separated issues references in single line message' do 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)). expect(subject.closed_by_message(message)).
to eq([issue, other_issue]) to eq([issue, other_issue])
end end
   
it 'fetches comma-separated issues numbers in single line message' do 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)). expect(subject.closed_by_message(message)).
to eq([issue, other_issue, third_issue]) to eq([issue, other_issue, third_issue])
end 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}"
   
expect(subject.closed_by_message(message)). expect(subject.closed_by_message(message)).
to eq([issue, other_issue]) to eq([issue, other_issue])
Loading
@@ -166,7 +166,7 @@ describe Gitlab::ClosingIssueExtractor do
Loading
@@ -166,7 +166,7 @@ describe Gitlab::ClosingIssueExtractor do
   
it 'fetches issues in hybrid message' do it 'fetches issues in hybrid message' do
message = "Awesome commit (closes #{reference})\n"\ 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)). expect(subject.closed_by_message(message)).
to eq([issue, other_issue, third_issue]) to eq([issue, other_issue, third_issue])
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment