diff options
Diffstat (limited to 'spec/features/groups/show_spec.rb')
-rw-r--r-- | spec/features/groups/show_spec.rb | 38 |
1 files changed, 2 insertions, 36 deletions
diff --git a/spec/features/groups/show_spec.rb b/spec/features/groups/show_spec.rb index bed998a0859..0d78bd23973 100644 --- a/spec/features/groups/show_spec.rb +++ b/spec/features/groups/show_spec.rb @@ -75,11 +75,7 @@ describe 'Group show page' do sign_in(owner) end - context 'when subgroups are supported', :nested_groups do - before do - allow(Group).to receive(:supports_nested_objects?) { true } - end - + context 'when subgroups are supported' do it 'allows creating subgroups' do visit path @@ -87,19 +83,6 @@ describe 'Group show page' do .to have_css("li[data-text='New subgroup']", visible: false) end end - - context 'when subgroups are not supported' do - before do - allow(Group).to receive(:supports_nested_objects?) { false } - end - - it 'does not allow creating subgroups' do - visit path - - expect(page) - .not_to have_selector("li[data-text='New subgroup']", visible: false) - end - end end context 'for maintainers' do @@ -107,11 +90,7 @@ describe 'Group show page' do sign_in(maintainer) end - context 'when subgroups are supported', :nested_groups do - before do - allow(Group).to receive(:supports_nested_objects?) { true } - end - + context 'when subgroups are supported' do context 'when subgroup_creation_level is set to maintainers' do before do relaxed_group.add_maintainer(maintainer) @@ -141,19 +120,6 @@ describe 'Group show page' do end end end - - context 'when subgroups are not supported' do - before do - allow(Group).to receive(:supports_nested_objects?) { false } - end - - it 'does not allow creating subgroups' do - visit path - - expect(page) - .not_to have_selector("li[data-text='New subgroup']", visible: false) - end - end end end |