diff options
author | Sean Edge <asedge@gmail.com> | 2014-06-24 05:35:36 +0400 |
---|---|---|
committer | Sean Edge <asedge@gmail.com> | 2014-09-04 17:47:20 +0400 |
commit | 468b2e8e0b46e7a7cee7cc9d9ce9b5c22e79c467 (patch) | |
tree | c19de65b8133c26a38a9813b9c6c5be412842e75 /spec/requests/api/repositories_spec.rb | |
parent | 487f78be129d44ae3dc098c9bd17925975435097 (diff) |
Added annotated tags. Updated tag haml file and call to gitlab-shell. Updated API for annotated tags. Added tests for API. Strip leading/trailing whitespace from message, if present. Update CHANGELOG.
Diffstat (limited to 'spec/requests/api/repositories_spec.rb')
-rw-r--r-- | spec/requests/api/repositories_spec.rb | 29 |
1 files changed, 23 insertions, 6 deletions
diff --git a/spec/requests/api/repositories_spec.rb b/spec/requests/api/repositories_spec.rb index ffcdbc4255e..3ada945ae05 100644 --- a/spec/requests/api/repositories_spec.rb +++ b/spec/requests/api/repositories_spec.rb @@ -23,12 +23,29 @@ describe API::API, api: true do 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: 'v2.0.0', - ref: 'master' - response.status.should == 201 - json_response['name'].should == 'v2.0.0' + context 'lightweight tags' do + it 'should create a new tag' do + post api("/projects/#{project.id}/repository/tags", user), + tag_name: 'v1.0.0', + ref: 'master' + + response.status.should == 201 + 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', + ref: 'master', + message: 'tag message' + + response.status.should == 201 + json_response['name'].should == 'v1.0.0' + # The message is not part of the JSON response. + # Additional changes to the gitlab_git gem may be required. + # json_response['message'].should == 'tag message' + end end it 'should deny for user without push access' do |