summaryrefslogtreecommitdiff
path: root/spec/requests/api/tags_spec.rb
diff options
context:
space:
mode:
authorRobert Schilling <rschilling@student.tugraz.at>2015-11-21 18:51:41 +0100
committerRobert Schilling <rschilling@student.tugraz.at>2015-11-21 18:51:41 +0100
commit6f7e90f6dba300591281aba08ffbe30ce3cc5c90 (patch)
treeebc223b60ee1edfe286b457f5888ee95c8c7d940 /spec/requests/api/tags_spec.rb
parentfaef95af1a07bdcfd02eead36d144f332b428f1f (diff)
downloadgitlab-ce-6f7e90f6dba300591281aba08ffbe30ce3cc5c90.tar.gz
Use POST to create a new release instead of PUT
Diffstat (limited to 'spec/requests/api/tags_spec.rb')
-rw-r--r--spec/requests/api/tags_spec.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/requests/api/tags_spec.rb b/spec/requests/api/tags_spec.rb
index 4dac3eec84e..0ee819ae445 100644
--- a/spec/requests/api/tags_spec.rb
+++ b/spec/requests/api/tags_spec.rb
@@ -119,21 +119,21 @@ describe API::API, api: true do
end
end
- describe 'PUT /projects/:id/repository/tags/:tag_name/release' do
+ describe 'POST /projects/:id/repository/tags/:tag_name/release' do
let(:tag_name) { project.repository.tag_names.first }
let(:description) { 'Awesome release!' }
it 'should create description for existing git tag' do
- put api("/projects/#{project.id}/repository/tags/#{tag_name}/release", user),
+ post api("/projects/#{project.id}/repository/tags/#{tag_name}/release", user),
description: description
- expect(response.status).to eq(200)
+ expect(response.status).to eq(201)
expect(json_response['tag_name']).to eq(tag_name)
expect(json_response['description']).to eq(description)
end
it 'should return 404 if the tag does not exist' do
- put api("/projects/#{project.id}/repository/tags/foobar/release", user),
+ post api("/projects/#{project.id}/repository/tags/foobar/release", user),
description: description
expect(response.status).to eq(404)