diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-03-09 21:09:41 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-03-09 21:09:41 +0300 |
commit | 72c331ebf56ba3d49a79ec799de84e790748adef (patch) | |
tree | ad23d8de3ff38f8d4fc95dca17d7aa4c8dce2923 /spec/features/groups_spec.rb | |
parent | 6f2b1c32f3ccf422575f591b42372534502dcd72 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/features/groups_spec.rb')
-rw-r--r-- | spec/features/groups_spec.rb | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/spec/features/groups_spec.rb b/spec/features/groups_spec.rb index c9a0844932a..28b22860f0a 100644 --- a/spec/features/groups_spec.rb +++ b/spec/features/groups_spec.rb @@ -143,7 +143,7 @@ RSpec.describe 'Group' do end end - describe 'create a nested group', :js do + describe 'create a nested group' do let_it_be(:group) { create(:group, path: 'foo') } context 'as admin' do @@ -153,13 +153,21 @@ RSpec.describe 'Group' do visit new_group_path(group, parent_id: group.id) end - it 'creates a nested group' do - fill_in 'Group name', with: 'bar' - fill_in 'Group URL', with: 'bar' - click_button 'Create group' + context 'when admin mode is enabled', :enable_admin_mode do + it 'creates a nested group' do + fill_in 'Group name', with: 'bar' + fill_in 'Group URL', with: 'bar' + click_button 'Create group' - expect(current_path).to eq(group_path('foo/bar')) - expect(page).to have_content("Group 'bar' was successfully created.") + expect(current_path).to eq(group_path('foo/bar')) + expect(page).to have_content("Group 'bar' was successfully created.") + end + end + + context 'when admin mode is disabled' do + it 'is not allowed' do + expect(page).to have_gitlab_http_status(:not_found) + end end end |