Commit 18ce34e9 authored by Yorick Peterse's avatar Yorick Peterse

Move EE hierarchy specs to a separate file

This moves the specs for ObjectHierarchy#root to a separate spec file,
ensuring the file shared between CE and EE is the same for both.
parent 9d328e7a
require 'spec_helper'
describe Gitlab::ObjectHierarchy do
let!(:parent) { create(:group) }
let!(:child1) { create(:group, parent: parent) }
let!(:child2) { create(:group, parent: child1) }
describe '#root' do
it 'includes only the roots' do
relation = described_class.new(Group.where(id: child2)).roots
expect(relation).to contain_exactly(parent)
end
it 'when quering parent it includes parent' do
relation = described_class.new(Group.where(id: parent)).roots
expect(relation).to contain_exactly(parent)
end
end
end
......@@ -145,20 +145,6 @@ describe Gitlab::ObjectHierarchy do
end
end
describe '#root' do
it 'includes only the roots' do
relation = described_class.new(Group.where(id: child2)).roots
expect(relation).to contain_exactly(parent)
end
it 'when quering parent it includes parent' do
relation = described_class.new(Group.where(id: parent)).roots
expect(relation).to contain_exactly(parent)
end
end
describe '#all_objects' do
let(:relation) do
described_class.new(Group.where(id: child1.id)).all_objects
......
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