Commit 131e212a authored by Sean McGivern's avatar Sean McGivern

Move EE lines in ReferenceExtractor spec to ee/

parent c6de49fb
# frozen_string_literal: true
require 'spec_helper'
describe Gitlab::ReferenceExtractor do
let(:group) { create(:group) }
let(:project) { create(:project, group: group) }
before do
group.add_developer(project.creator)
end
subject { described_class.new(project, project.creator) }
it 'accesses valid epics' do
stub_licensed_features(epics: true)
@e0 = create(:epic, group: group)
@e1 = create(:epic, group: group)
@e2 = create(:epic, group: create(:group, :private))
text = "#{@e0.to_reference(group, full: true)}, &999, #{@e1.to_reference(group, full: true)}, #{@e2.to_reference(group, full: true)}"
subject.analyze(text, { group: group })
expect(subject.epics).to match_array([@e0, @e1])
end
end
# frozen_string_literal: true
require 'spec_helper'
describe Gitlab::ReferenceExtractor do
let(:group) { create(:group) }
let(:project) { create(:project, group: group) }
let(:project) { create(:project) }
before do
group.add_developer(project.creator)
project.add_developer(project.creator)
end
subject { described_class.new(project, project.creator) }
......@@ -163,20 +164,6 @@ describe Gitlab::ReferenceExtractor do
expect(subject.snippets).to match_array([@s0, @s1])
end
it 'accesses valid epics' do
stub_licensed_features(epics: true)
@e0 = create(:epic, group: group)
@e1 = create(:epic, group: group)
@e2 = create(:epic, group: create(:group, :private))
text = "#{@e0.to_reference(group, full: true)}, &999, #{@e1.to_reference(group, full: true)}, #{@e2.to_reference(group, full: true)}"
subject.analyze(text, { group: group })
expect(subject.epics).to match_array([@e0, @e1])
end
it 'accesses valid commits' do
project = create(:project, :repository) { |p| p.add_developer(p.creator) }
commit = project.commit('master')
......
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