summaryrefslogtreecommitdiff
path: root/spec/features/groups/show_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/features/groups/show_spec.rb')
-rw-r--r--spec/features/groups/show_spec.rb40
1 files changed, 4 insertions, 36 deletions
diff --git a/spec/features/groups/show_spec.rb b/spec/features/groups/show_spec.rb
index bed998a0859..942a9889488 100644
--- a/spec/features/groups/show_spec.rb
+++ b/spec/features/groups/show_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'spec_helper'
describe 'Group show page' do
@@ -75,11 +77,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 +85,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 +92,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 +122,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