diff options
author | Jarka Košanová <jarka@gitlab.com> | 2018-12-18 15:15:51 +0300 |
---|---|---|
committer | Jarka Košanová <jarka@gitlab.com> | 2018-12-19 17:24:29 +0300 |
commit | b1c39553859bb1f5f830fa759f2202462fe24d98 (patch) | |
tree | 235757cdbb225f709ecf105187b69a5f39c711bf /spec/policies | |
parent | b1b7fa7802eecbacff04a9434eff69b0f3cbaaad (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/policies')
-rw-r--r-- | spec/policies/group_policy_spec.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/policies/group_policy_spec.rb b/spec/policies/group_policy_spec.rb index 9d0093e8159..baf21efa75c 100644 --- a/spec/policies/group_policy_spec.rb +++ b/spec/policies/group_policy_spec.rb @@ -147,7 +147,7 @@ describe GroupPolicy do let(:current_user) { owner } it do - allow(Group).to receive(:supports_nested_groups?).and_return(true) + allow(Group).to receive(:supports_nested_objects?).and_return(true) expect_allowed(*guest_permissions) expect_allowed(*reporter_permissions) @@ -161,7 +161,7 @@ describe GroupPolicy do let(:current_user) { admin } it do - allow(Group).to receive(:supports_nested_groups?).and_return(true) + allow(Group).to receive(:supports_nested_objects?).and_return(true) expect_allowed(*guest_permissions) expect_allowed(*reporter_permissions) @@ -173,7 +173,7 @@ describe GroupPolicy do describe 'when nested group support feature is disabled' do before do - allow(Group).to receive(:supports_nested_groups?).and_return(false) + allow(Group).to receive(:supports_nested_objects?).and_return(false) end context 'admin' do @@ -282,7 +282,7 @@ describe GroupPolicy do let(:current_user) { owner } it do - allow(Group).to receive(:supports_nested_groups?).and_return(true) + allow(Group).to receive(:supports_nested_objects?).and_return(true) expect_allowed(*guest_permissions) expect_allowed(*reporter_permissions) |