Skip to content
Snippets Groups Projects
Verified Commit 3162140d authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Fix tag tests

parent 66516da3
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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,
Loading
Loading
Loading
Loading
@@ -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'
 
Loading
Loading
@@ -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
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment