summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-10-30 16:17:36 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-10-30 16:17:36 +0200
commitf0dd16d53e81bb0796fa6fa422efcab8a64f097a (patch)
tree8d583e1e96b1e82334d185d9252e22842fe36689 /spec
parent8388bbe82918d2fca2600620f48e048ccfab2c97 (diff)
parentc2f0ae8a40658d02dfa128881a014fe1e907f61c (diff)
downloadgitlab-ce-f0dd16d53e81bb0796fa6fa422efcab8a64f097a.tar.gz
Merge branch 'master' of github.com:gitlabhq/gitlabhq
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> Conflicts: CHANGELOG
Diffstat (limited to 'spec')
-rw-r--r--spec/requests/api/repositories_spec.rb33
1 files changed, 18 insertions, 15 deletions
diff --git a/spec/requests/api/repositories_spec.rb b/spec/requests/api/repositories_spec.rb
index 6e54839b677..dd7a0fc6cc8 100644
--- a/spec/requests/api/repositories_spec.rb
+++ b/spec/requests/api/repositories_spec.rb
@@ -34,21 +34,24 @@ describe API::API, api: true do
end
end
- # TODO: fix this test for CI
- #context 'annotated tag' do
- #it 'should create a new annotated tag' do
- #post api("/projects/#{project.id}/repository/tags", user),
- #tag_name: 'v7.1.0',
- #ref: 'master',
- #message: 'tag message'
-
- #response.status.should == 201
- #json_response['name'].should == 'v7.1.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
+ context 'annotated tag' do
+ it 'should create a new annotated tag' do
+ # Identity must be set in .gitconfig to create annotated tag.
+ repo_path = File.join(Gitlab.config.gitlab_shell.repos_path,
+ project.path_with_namespace + '.git')
+ system(*%W(git --git-dir=#{repo_path} config user.name #{user.name}))
+ system(*%W(git --git-dir=#{repo_path} config user.email #{user.email}))
+
+ post api("/projects/#{project.id}/repository/tags", user),
+ tag_name: 'v7.1.0',
+ ref: 'master',
+ message: 'Release 7.1.0'
+
+ response.status.should == 201
+ json_response['name'].should == 'v7.1.0'
+ json_response['message'].should == 'Release 7.1.0'
+ end
+ end
it 'should deny for user without push access' do
post api("/projects/#{project.id}/repository/tags", user2),