diff --git a/spec/features/groups/share_lock_spec.rb b/spec/features/groups/share_lock_spec.rb index 2e2da6b862c..cf1079bb6d6 100644 --- a/spec/features/groups/share_lock_spec.rb +++ b/spec/features/groups/share_lock_spec.rb @@ -9,7 +9,7 @@ feature 'Group share lock' do sign_in(root_owner) end - context 'with a subgroup' do + context 'with a subgroup', :nested_groups do given!(:subgroup) { create(:group, parent: root_group) } context 'when enabling the parent group share lock' do diff --git a/spec/features/projects/members/share_with_group_spec.rb b/spec/features/projects/members/share_with_group_spec.rb index f71cdab8455..9a9cedf1a0e 100644 --- a/spec/features/projects/members/share_with_group_spec.rb +++ b/spec/features/projects/members/share_with_group_spec.rb @@ -58,7 +58,7 @@ feature 'Project > Members > Share with Group', :js do end end - context 'for a project in a subgroup', :postgresql do + context 'for a project in a subgroup', :nested_groups do let!(:group_to_share_with) { create(:group) } let(:root_group) { create(:group) } let(:subgroup) { create(:group, parent: root_group) } diff --git a/spec/models/namespace_spec.rb b/spec/models/namespace_spec.rb index 2bfe04fecc7..3f38316ceae 100644 --- a/spec/models/namespace_spec.rb +++ b/spec/models/namespace_spec.rb @@ -407,7 +407,7 @@ describe Namespace do it { expect(group.all_projects.to_a).to eq([project2, project1]) } end - describe '#share_with_group_lock with subgroups' do + describe '#share_with_group_lock with subgroups', :nested_groups do context 'when creating a subgroup' do let(:subgroup) { create(:group, parent: root_group )} diff --git a/spec/policies/group_policy_spec.rb b/spec/policies/group_policy_spec.rb index 9fa63982790..dcc7b7d5b9c 100644 --- a/spec/policies/group_policy_spec.rb +++ b/spec/policies/group_policy_spec.rb @@ -244,7 +244,7 @@ describe GroupPolicy do end describe 'change_share_with_group_lock' do - context 'when the group has a parent' do + context 'when the group has a parent', :nested_groups do let(:group) { create(:group, parent: parent) } context 'when the parent share_with_group_lock is enabled' do diff --git a/spec/services/groups/update_service_spec.rb b/spec/services/groups/update_service_spec.rb index aa8e058903b..80e9c0c81dc 100644 --- a/spec/services/groups/update_service_spec.rb +++ b/spec/services/groups/update_service_spec.rb @@ -101,7 +101,7 @@ describe Groups::UpdateService do end end - context 'for a subgroup' do + context 'for a subgroup', :nested_groups do let(:subgroup) { create(:group, :private, parent: private_group) } context 'when the parent group share_with_group_lock is enabled' do