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
Jérome Perrin
gitlab-ce
Commits
446e920a
Commit
446e920a
authored
May 26, 2014
by
Sean Edge
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add tests for creating tag with API.
parent
2490cfbc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
spec/requests/api/repositories_spec.rb
spec/requests/api/repositories_spec.rb
+19
-0
No files found.
spec/requests/api/repositories_spec.rb
View file @
446e920a
...
@@ -23,6 +23,25 @@ describe API::API, api: true do
...
@@ -23,6 +23,25 @@ describe API::API, api: true do
end
end
end
end
describe
'POST /projects/:id/repository/tags'
do
it
'should create a new tag'
do
post
api
(
"/projects/
#{
project
.
id
}
/repository/tags"
,
user
),
tag_name:
'v1.0.0'
,
ref:
'621491c677087aa243f165eab467bfdfbee00be1'
response
.
status
.
should
==
201
json_response
.
first
[
'name'
].
should
==
'v1.0.0'
json_response
[
'commit'
][
'id'
].
should
==
'621491c677087aa243f165eab467bfdfbee00be1'
end
it
"should deny for user without push access"
do
post
api
(
"/projects/
#{
project
.
id
}
/repository/tags"
,
user2
),
tag_name:
'v1.0.0'
,
ref:
'621491c677087aa243f165eab467bfdfbee00be1'
response
.
status
.
should
==
403
end
end
describe
"GET /projects/:id/repository/tree"
do
describe
"GET /projects/:id/repository/tree"
do
context
"authorized user"
do
context
"authorized user"
do
before
{
project
.
team
<<
[
user2
,
:reporter
]
}
before
{
project
.
team
<<
[
user2
,
:reporter
]
}
...
...
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