Adds specs for renaming a project with container images
This commit is contained in:
parent
881bc45abb
commit
418af1010a
1 changed files with 15 additions and 0 deletions
|
@ -103,6 +103,21 @@ describe Projects::UpdateService, '#execute', :services do
|
|||
end
|
||||
end
|
||||
|
||||
context 'when renaming project that contains container images' do
|
||||
before do
|
||||
stub_container_registry_config(enabled: true)
|
||||
stub_container_registry_tags(repository: /image/, tags: %w[rc1])
|
||||
create(:container_repository, project: project, name: :image)
|
||||
end
|
||||
|
||||
it 'does not allow to rename the project' do
|
||||
result = update_project(project, admin, path: 'renamed')
|
||||
|
||||
expect(result).to include(status: :error)
|
||||
expect(result[:message]).to match(/contains container registry tags/)
|
||||
end
|
||||
end
|
||||
|
||||
context 'when passing invalid parameters' do
|
||||
it 'returns an error result when record cannot be updated' do
|
||||
result = update_project(project, admin, { name: 'foo&bar' })
|
||||
|
|
Loading…
Reference in a new issue