Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Houdebert <kevin@qwazerty.eu>2014-10-14 21:07:34 +0400
committerKevin Houdebert <kevin@qwazerty.eu>2014-10-14 21:07:34 +0400
commit62b322d7b567f1fae2ea8b5a3b0e71a62506e47d (patch)
tree923fe5f48bd2864f7a7665ef67d574c14b5088c3 /spec/requests/api/services_spec.rb
parente3bd17a7ba5238c147a79d0770e8503fd913610c (diff)
Add Hipchat services API
Diffstat (limited to 'spec/requests/api/services_spec.rb')
-rw-r--r--spec/requests/api/services_spec.rb26
1 files changed, 26 insertions, 0 deletions
diff --git a/spec/requests/api/services_spec.rb b/spec/requests/api/services_spec.rb
index f883c9e028a..d8282d0696b 100644
--- a/spec/requests/api/services_spec.rb
+++ b/spec/requests/api/services_spec.rb
@@ -27,4 +27,30 @@ describe API::API, api: true do
project.gitlab_ci_service.should be_nil
end
end
+
+ describe 'PUT /projects/:id/services/hipchat' do
+ it 'should update hipchat settings' do
+ put api("/projects/#{project.id}/services/hipchat", user),
+ token: 'secret-token', room: 'test'
+
+ response.status.should == 200
+ project.hipchat_service.should_not be_nil
+ end
+
+ it 'should return if required fields missing' do
+ put api("/projects/#{project.id}/services/gitlab-ci", user),
+ token: 'secret-token', active: true
+
+ response.status.should == 400
+ end
+ end
+
+ describe 'DELETE /projects/:id/services/hipchat' do
+ it 'should delete hipchat settings' do
+ delete api("/projects/#{project.id}/services/hipchat", user)
+
+ response.status.should == 200
+ project.hipchat_service.should be_nil
+ end
+ end
end