summaryrefslogtreecommitdiff
path: root/spec/features/groups
diff options
context:
space:
mode:
authorFabio Papa <fabtheman@gmail.com>2019-07-02 08:38:38 -0700
committerFabio Papa <fabtheman@gmail.com>2019-07-19 12:06:55 -0700
commitc22e87121e029bb79aa09f2d04010d738545c7f9 (patch)
tree87f6b8dd5e6caf2d35dbe6e3fa6ada4f37221a5d /spec/features/groups
parentf12636bfb338ae2ac70b7e8eb6e481beb1c28a4d (diff)
downloadgitlab-ce-c22e87121e029bb79aa09f2d04010d738545c7f9.tar.gz
Apply recomended changes from merge coach
Diffstat (limited to 'spec/features/groups')
-rw-r--r--spec/features/groups/show_spec.rb15
1 files changed, 9 insertions, 6 deletions
diff --git a/spec/features/groups/show_spec.rb b/spec/features/groups/show_spec.rb
index f1501181432..bed998a0859 100644
--- a/spec/features/groups/show_spec.rb
+++ b/spec/features/groups/show_spec.rb
@@ -57,11 +57,11 @@ describe 'Group show page' do
context 'subgroup support' do
let(:restricted_group) do
- create(:group, subgroup_creation_level: ::Gitlab::Access::OWNER_SUBGROUP_ACCESS)
+ create(:group, subgroup_creation_level: ::Gitlab::Access::OWNER_SUBGROUP_ACCESS)
end
let(:relaxed_group) do
- create(:group, subgroup_creation_level: ::Gitlab::Access::MAINTAINER_SUBGROUP_ACCESS)
+ create(:group, subgroup_creation_level: ::Gitlab::Access::MAINTAINER_SUBGROUP_ACCESS)
end
let(:owner) { create(:user) }
@@ -78,10 +78,11 @@ describe 'Group show page' do
context 'when subgroups are supported', :nested_groups do
before do
allow(Group).to receive(:supports_nested_objects?) { true }
- visit path
end
it 'allows creating subgroups' do
+ visit path
+
expect(page)
.to have_css("li[data-text='New subgroup']", visible: false)
end
@@ -90,10 +91,11 @@ describe 'Group show page' do
context 'when subgroups are not supported' do
before do
allow(Group).to receive(:supports_nested_objects?) { false }
- visit path
end
it 'does not allow creating subgroups' do
+ visit path
+
expect(page)
.not_to have_selector("li[data-text='New subgroup']", visible: false)
end
@@ -113,11 +115,12 @@ describe 'Group show page' do
context 'when subgroup_creation_level is set to maintainers' do
before do
relaxed_group.add_maintainer(maintainer)
- path = group_path(relaxed_group)
- visit path
end
it 'allows creating subgroups' do
+ path = group_path(relaxed_group)
+ visit path
+
expect(page)
.to have_css("li[data-text='New subgroup']", visible: false)
end