diff options
author | Robert Schilling <rschilling@student.tugraz.at> | 2015-11-21 20:08:45 +0300 |
---|---|---|
committer | Robert Schilling <rschilling@student.tugraz.at> | 2015-11-21 20:08:45 +0300 |
commit | faef95af1a07bdcfd02eead36d144f332b428f1f (patch) | |
tree | 7f34f351e7681036bbafda1980e1d403316ee7d5 /spec/requests/api/tags_spec.rb | |
parent | 2cba93a0d2d12ee36bf98569e5c6c14ac7ea40e0 (diff) |
API: Return 404 if the tag for a release does not exist
Diffstat (limited to 'spec/requests/api/tags_spec.rb')
-rw-r--r-- | spec/requests/api/tags_spec.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/requests/api/tags_spec.rb b/spec/requests/api/tags_spec.rb index e3fd2d547c4..4dac3eec84e 100644 --- a/spec/requests/api/tags_spec.rb +++ b/spec/requests/api/tags_spec.rb @@ -131,5 +131,13 @@ describe API::API, api: true do 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), + description: description + + expect(response.status).to eq(404) + expect(json_response['message']).to eq('Tag does not exist') + end end end |