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:
authorJarka Košanová <jarka@gitlab.com>2018-12-18 15:15:51 +0300
committerJarka Košanová <jarka@gitlab.com>2018-12-19 17:24:29 +0300
commitb1c39553859bb1f5f830fa759f2202462fe24d98 (patch)
tree235757cdbb225f709ecf105187b69a5f39c711bf /spec/services/groups
parentb1b7fa7802eecbacff04a9434eff69b0f3cbaaad (diff)
Rename GroupHierarchy into ObjectHierarchy
- we now use the hierarchy class also for epics - also rename supports_nested_groups? into supports_nested_objects? - move it to a concern
Diffstat (limited to 'spec/services/groups')
-rw-r--r--spec/services/groups/create_service_spec.rb4
-rw-r--r--spec/services/groups/nested_create_service_spec.rb2
-rw-r--r--spec/services/groups/transfer_service_spec.rb2
3 files changed, 4 insertions, 4 deletions
diff --git a/spec/services/groups/create_service_spec.rb b/spec/services/groups/create_service_spec.rb
index 224e933bebc..fe6a8691ae0 100644
--- a/spec/services/groups/create_service_spec.rb
+++ b/spec/services/groups/create_service_spec.rb
@@ -55,7 +55,7 @@ describe Groups::CreateService, '#execute' do
context 'when nested groups feature is disabled' do
it 'does not save group and returns an error' do
- allow(Group).to receive(:supports_nested_groups?).and_return(false)
+ allow(Group).to receive(:supports_nested_objects?).and_return(false)
is_expected.not_to be_persisted
expect(subject.errors[:parent_id]).to include('You don’t have permission to create a subgroup in this group.')
@@ -66,7 +66,7 @@ describe Groups::CreateService, '#execute' do
context 'when nested groups feature is enabled' do
before do
- allow(Group).to receive(:supports_nested_groups?).and_return(true)
+ allow(Group).to receive(:supports_nested_objects?).and_return(true)
end
context 'as guest' do
diff --git a/spec/services/groups/nested_create_service_spec.rb b/spec/services/groups/nested_create_service_spec.rb
index 86fdd43c1e5..75d6ddb0a2c 100644
--- a/spec/services/groups/nested_create_service_spec.rb
+++ b/spec/services/groups/nested_create_service_spec.rb
@@ -30,7 +30,7 @@ describe Groups::NestedCreateService do
let(:params) { { group_path: 'a-group' } }
before do
- allow(Group).to receive(:supports_nested_groups?) { false }
+ allow(Group).to receive(:supports_nested_objects?) { false }
end
it 'creates the group' do
diff --git a/spec/services/groups/transfer_service_spec.rb b/spec/services/groups/transfer_service_spec.rb
index dd8a1cee074..6b48c993c57 100644
--- a/spec/services/groups/transfer_service_spec.rb
+++ b/spec/services/groups/transfer_service_spec.rb
@@ -9,7 +9,7 @@ describe Groups::TransferService, :postgresql do
shared_examples 'ensuring allowed transfer for a group' do
context 'with other database than PostgreSQL' do
before do
- allow(Group).to receive(:supports_nested_groups?).and_return(false)
+ allow(Group).to receive(:supports_nested_objects?).and_return(false)
end
it 'should return false' do