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:
authorFabio Papa <fabtheman@gmail.com>2019-07-01 00:40:23 +0300
committerFabio Papa <fabtheman@gmail.com>2019-07-19 21:55:48 +0300
commit81662f7b9fae45689b9291427fd9b192ef88be4b (patch)
tree161b452c8e6caa6d800f0779151bed7176208810 /spec/features/groups
parente962ffbc90b797cc9f1eb922e918c093dac7d4a1 (diff)
Make subgroup_creation_level default to maintainer at SQL level
- Migration updates existing groups to "owner", then sets default to "maintainer" so that new groups will default to that - Update spec examples
Diffstat (limited to 'spec/features/groups')
-rw-r--r--spec/features/groups/show_spec.rb17
1 files changed, 11 insertions, 6 deletions
diff --git a/spec/features/groups/show_spec.rb b/spec/features/groups/show_spec.rb
index 163906010fa..48ba9064327 100644
--- a/spec/features/groups/show_spec.rb
+++ b/spec/features/groups/show_spec.rb
@@ -72,10 +72,11 @@ describe 'Group show page' do
context 'when subgroups are supported', :js, :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
@@ -84,10 +85,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
@@ -102,10 +104,9 @@ describe 'Group show page' do
context 'when subgroups are supported', :js, :nested_groups do
before do
allow(Group).to receive(:supports_nested_objects?) { true }
- visit path
end
- context 'when subgroup_creation_level is set to maintainer' do
+ context 'when subgroup_creation_level is set to maintainers' do
let(:group) do
create(:group,
subgroup_creation_level: ::Gitlab::Access::MAINTAINER_SUBGROUP_ACCESS)
@@ -113,7 +114,9 @@ describe 'Group show page' do
it 'allows creating subgroups' do
visit path
- expect(page).to have_css("li[data-text='New subgroup']", visible: false)
+
+ expect(page)
+ .to have_css("li[data-text='New subgroup']", visible: false)
end
end
@@ -125,6 +128,7 @@ describe 'Group show page' do
it 'does not allow creating subgroups' do
visit path
+
expect(page)
.not_to have_css("li[data-text='New subgroup']", visible: false)
end
@@ -134,10 +138,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