diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-28 13:14:44 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-28 13:14:44 +0000 |
commit | e7b5a68daecd0aff0cc66666cb38c7971027a05a (patch) | |
tree | b153db785557cc807da5e623cb130a1ef384926e /spec/controllers | |
parent | c8fb2e6a3942330079bde06d919cd33c6bc7600e (diff) | |
download | gitlab-ce-e7b5a68daecd0aff0cc66666cb38c7971027a05a.tar.gz |
Add latest changes from gitlab-org/gitlab@13-3-stable-ee
Diffstat (limited to 'spec/controllers')
-rw-r--r-- | spec/controllers/groups_controller_spec.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/controllers/groups_controller_spec.rb b/spec/controllers/groups_controller_spec.rb index 469e58c94e7..78de89de796 100644 --- a/spec/controllers/groups_controller_spec.rb +++ b/spec/controllers/groups_controller_spec.rb @@ -555,6 +555,21 @@ RSpec.describe GroupsController do end end + context 'when there is a conflicting group path' do + render_views + + let!(:conflict_group) { create(:group, path: SecureRandom.hex(12) ) } + let!(:old_name) { group.name } + + it 'does not render references to the conflicting group' do + put :update, params: { id: group.to_param, group: { path: conflict_group.path } } + + expect(response).to have_gitlab_http_status(:ok) + expect(group.reload.name).to eq(old_name) + expect(response.body).not_to include(conflict_group.path) + end + end + context 'when a project inside the group has container repositories' do before do stub_container_registry_config(enabled: true) |