diff options
author | Robert Speicher <rspeicher@gmail.com> | 2021-01-20 13:34:23 -0600 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2021-01-20 13:34:23 -0600 |
commit | 6438df3a1e0fb944485cebf07976160184697d72 (patch) | |
tree | 00b09bfd170e77ae9391b1a2f5a93ef6839f2597 /spec/models/namespace_spec.rb | |
parent | 42bcd54d971da7ef2854b896a7b34f4ef8601067 (diff) | |
download | gitlab-ce-6438df3a1e0fb944485cebf07976160184697d72.tar.gz |
Add latest changes from gitlab-org/gitlab@13-8-stable-eev13.8.0-rc42
Diffstat (limited to 'spec/models/namespace_spec.rb')
-rw-r--r-- | spec/models/namespace_spec.rb | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/spec/models/namespace_spec.rb b/spec/models/namespace_spec.rb index 0130618d004..a3c0a43115e 100644 --- a/spec/models/namespace_spec.rb +++ b/spec/models/namespace_spec.rb @@ -19,7 +19,8 @@ RSpec.describe Namespace do it { is_expected.to have_one :aggregation_schedule } it { is_expected.to have_one :namespace_settings } it { is_expected.to have_many :custom_emoji } - it { is_expected.to have_many :namespace_onboarding_actions } + it { is_expected.to have_one :package_setting_relation } + it { is_expected.to have_one :onboarding_progress } end describe 'validations' do @@ -1500,4 +1501,24 @@ RSpec.describe Namespace do end end end + + describe '#root?' do + subject { namespace.root? } + + context 'when is subgroup' do + before do + namespace.parent = build(:group) + end + + it 'returns false' do + is_expected.to eq(false) + end + end + + context 'when is root' do + it 'returns true' do + is_expected.to eq(true) + end + end + end end |