diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-16 09:07:51 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-16 09:07:51 +0000 |
commit | 914ea32e0efca21436220df2c10e1bfbe4ed3da9 (patch) | |
tree | e8eb3b97aea2006bd863c586b7ec41d51f654b3b /spec/services/groups/transfer_service_spec.rb | |
parent | 3546e1bb0971347e9e9984de0799e3fb53743b33 (diff) | |
download | gitlab-ce-914ea32e0efca21436220df2c10e1bfbe4ed3da9.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/services/groups/transfer_service_spec.rb')
-rw-r--r-- | spec/services/groups/transfer_service_spec.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/services/groups/transfer_service_spec.rb b/spec/services/groups/transfer_service_spec.rb index 0cbb3122bb0..5ef1fb1932f 100644 --- a/spec/services/groups/transfer_service_spec.rb +++ b/spec/services/groups/transfer_service_spec.rb @@ -426,5 +426,22 @@ describe Groups::TransferService do end end end + + context 'when a project in group has container images' do + let(:group) { create(:group, :public, :nested) } + let!(:project) { create(:project, :repository, :public, namespace: group) } + + before do + stub_container_registry_tags(repository: /image/, tags: %w[rc1]) + create(:container_repository, project: project, name: :image) + create(:group_member, :owner, group: new_parent_group, user: user) + end + + it 'does not allow group to be transferred' do + transfer_service.execute(new_parent_group) + + expect(transfer_service.error).to match(/Docker images in their Container Registry/) + end + end end end |