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
iv
gitlab-ce
Commits
3162140d
Commit
3162140d
authored
Sep 05, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix tag tests
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
66516da3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
lib/api/repositories.rb
lib/api/repositories.rb
+1
-0
spec/requests/api/repositories_spec.rb
spec/requests/api/repositories_spec.rb
+3
-2
No files found.
lib/api/repositories.rb
View file @
3162140d
...
...
@@ -41,6 +41,7 @@ module API
result
=
CreateTagService
.
new
.
execute
(
user_project
,
params
[
:tag_name
],
params
[
:ref
],
message
,
current_user
)
if
result
[
:status
]
==
:success
present
result
[
:tag
],
with:
Entities
::
RepoObject
,
...
...
spec/requests/api/repositories_spec.rb
View file @
3162140d
...
...
@@ -33,10 +33,11 @@ describe API::API, api: true do
json_response
[
'name'
].
should
==
'v1.0.0'
end
end
context
'annotated tag'
do
it
'should create a new annotated tag'
do
post
api
(
"/projects/
#{
project
.
id
}
/repository/tags"
,
user
),
tag_name:
'v1.
0
.0'
,
tag_name:
'v1.
1
.0'
,
ref:
'master'
,
message:
'tag message'
...
...
@@ -50,7 +51,7 @@ describe API::API, api: true do
it
'should deny for user without push access'
do
post
api
(
"/projects/
#{
project
.
id
}
/repository/tags"
,
user2
),
tag_name:
'v1.
0
.0'
,
tag_name:
'v1.
2
.0'
,
ref:
'621491c677087aa243f165eab467bfdfbee00be1'
response
.
status
.
should
==
403
end
...
...
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