summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-11-12 23:54:22 +0100
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-11-12 23:54:22 +0100
commitd6db451732a5ed9f31f3a345dd936abc1c07c6cf (patch)
tree9d17dcce5010deef83a50bb5b4a6a9c6976f6970 /spec
parent8f53094f0f22fe208f6f6e0d39037188bf14a937 (diff)
downloadgitlab-ce-d6db451732a5ed9f31f3a345dd936abc1c07c6cf.tar.gz
Add api test for creating tag with release info
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'spec')
-rw-r--r--spec/requests/api/tags_spec.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/requests/api/tags_spec.rb b/spec/requests/api/tags_spec.rb
index 4362e0ec28d..cc9a5f47582 100644
--- a/spec/requests/api/tags_spec.rb
+++ b/spec/requests/api/tags_spec.rb
@@ -52,6 +52,19 @@ describe API::API, api: true do
end
end
+ context 'lightweight tags with release notes' do
+ it 'should create a new tag' do
+ post api("/projects/#{project.id}/repository/tags", user),
+ tag_name: 'v7.0.1',
+ ref: 'master',
+ release_description: 'Wow'
+
+ expect(response.status).to eq(201)
+ expect(json_response['name']).to eq('v7.0.1')
+ expect(json_response['release']['description']).to eq('Wow')
+ end
+ end
+
context 'annotated tag' do
it 'should create a new annotated tag' do
# Identity must be set in .gitconfig to create annotated tag.