Commit 3162140d authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Fix tag tests

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 66516da3
......@@ -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,
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment