Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-03-16 21:18:33 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-03-16 21:18:33 +0300
commitf64a639bcfa1fc2bc89ca7db268f594306edfd7c (patch)
treea2c3c2ebcc3b45e596949db485d6ed18ffaacfa1 /spec/models/namespace
parentbfbc3e0d6583ea1a91f627528bedc3d65ba4b10f (diff)
Add latest changes from gitlab-org/gitlab@13-10-stable-eev13.10.0-rc40
Diffstat (limited to 'spec/models/namespace')
-rw-r--r--spec/models/namespace/traversal_hierarchy_spec.rb16
1 files changed, 8 insertions, 8 deletions
diff --git a/spec/models/namespace/traversal_hierarchy_spec.rb b/spec/models/namespace/traversal_hierarchy_spec.rb
index 71b0e974106..83e6d704640 100644
--- a/spec/models/namespace/traversal_hierarchy_spec.rb
+++ b/spec/models/namespace/traversal_hierarchy_spec.rb
@@ -3,41 +3,41 @@
require 'spec_helper'
RSpec.describe Namespace::TraversalHierarchy, type: :model do
- let_it_be(:root, reload: true) { create(:namespace, :with_hierarchy) }
+ let_it_be(:root, reload: true) { create(:group, :with_hierarchy) }
describe '.for_namespace' do
- let(:hierarchy) { described_class.for_namespace(namespace) }
+ let(:hierarchy) { described_class.for_namespace(group) }
context 'with root group' do
- let(:namespace) { root }
+ let(:group) { root }
it { expect(hierarchy.root).to eq root }
end
context 'with child group' do
- let(:namespace) { root.children.first.children.first }
+ let(:group) { root.children.first.children.first }
it { expect(hierarchy.root).to eq root }
end
context 'with group outside of hierarchy' do
- let(:namespace) { create(:namespace) }
+ let(:group) { create(:namespace) }
it { expect(hierarchy.root).not_to eq root }
end
end
describe '.new' do
- let(:hierarchy) { described_class.new(namespace) }
+ let(:hierarchy) { described_class.new(group) }
context 'with root group' do
- let(:namespace) { root }
+ let(:group) { root }
it { expect(hierarchy.root).to eq root }
end
context 'with child group' do
- let(:namespace) { root.children.first }
+ let(:group) { root.children.first }
it { expect { hierarchy }.to raise_error(StandardError, 'Must specify a root node') }
end