Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
418af101
Commit
418af101
authored
Jul 14, 2017
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adds specs for renaming a project with container images
parent
881bc45a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
spec/services/projects/update_service_spec.rb
spec/services/projects/update_service_spec.rb
+15
-0
No files found.
spec/services/projects/update_service_spec.rb
View file @
418af101
...
@@ -103,6 +103,21 @@ describe Projects::UpdateService, '#execute', :services do
...
@@ -103,6 +103,21 @@ describe Projects::UpdateService, '#execute', :services do
end
end
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
context
'when passing invalid parameters'
do
it
'returns an error result when record cannot be updated'
do
it
'returns an error result when record cannot be updated'
do
result
=
update_project
(
project
,
admin
,
{
name:
'foo&bar'
})
result
=
update_project
(
project
,
admin
,
{
name:
'foo&bar'
})
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment