diff options
author | Robert Speicher <rspeicher@gmail.com> | 2015-04-15 21:02:36 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2015-04-20 20:01:46 +0300 |
commit | a3c71d9898ac762ebec8800a68f8aaae7671773c (patch) | |
tree | e62c46c605b6f01e4ebadeb1935302fa8493dca2 | |
parent | 31172475d220f7681abac0e46a171e315fdcfadc (diff) |
Add spec for ReferenceExtractor#labels
-rw-r--r-- | spec/lib/gitlab/reference_extractor_spec.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/lib/gitlab/reference_extractor_spec.rb b/spec/lib/gitlab/reference_extractor_spec.rb index f34b6f3878e..6fba140f69d 100644 --- a/spec/lib/gitlab/reference_extractor_spec.rb +++ b/spec/lib/gitlab/reference_extractor_spec.rb @@ -106,6 +106,15 @@ describe Gitlab::ReferenceExtractor do expect(subject.merge_requests).to eq([@m1, @m0]) end + it 'accesses valid labels' do + @l0 = create(:label, title: 'one', project: project) + @l1 = create(:label, title: 'two', project: project) + @l2 = create(:label) + + subject.analyze("~#{@l0.id}, ~999, ~#{@l2.id}, ~#{@l1.id}") + expect(subject.labels).to eq([@l0, @l1]) + end + it 'accesses valid snippets' do @s0 = create(:project_snippet, project: project) @s1 = create(:project_snippet, project: project) |