diff options
author | George Tsiolis <tsiolis.g@gmail.com> | 2018-07-11 16:28:53 +0300 |
---|---|---|
committer | George Tsiolis <tsiolis.g@gmail.com> | 2018-07-11 16:28:53 +0300 |
commit | 69f9c9116141f291e90374ffa5959a8881c950e1 (patch) | |
tree | cb5a4d5868eb7266c965d5951c6c4120c521fca0 /spec/lib/gitlab/closing_issue_extractor_spec.rb | |
parent | 3d1a23162ae14e0b5ccf7b42c6bac13adfda1e4e (diff) |
Add tests for non-comma-separated issue numbers in single line message
Diffstat (limited to 'spec/lib/gitlab/closing_issue_extractor_spec.rb')
-rw-r--r-- | spec/lib/gitlab/closing_issue_extractor_spec.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/lib/gitlab/closing_issue_extractor_spec.rb b/spec/lib/gitlab/closing_issue_extractor_spec.rb index 8d4862932b2..e6cb402aef3 100644 --- a/spec/lib/gitlab/closing_issue_extractor_spec.rb +++ b/spec/lib/gitlab/closing_issue_extractor_spec.rb @@ -379,6 +379,20 @@ describe Gitlab::ClosingIssueExtractor do .to match_array([issue, other_issue, third_issue]) 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 message = "Awesome commit (closes #{reference})\nAlso fixes #{reference2}" |