Permalink
Browse files

Add unbind service method to cc ipc gem

Test plan:
- Unit tests pass

Change-Id: I5c14a020f418fbd8baa2884fc714e2647fd0dffb
  • Loading branch information...
1 parent 95bb209 commit b2e290d5228035442387a36874eeb6dd4a37d9ac mpage committed Oct 20, 2011
@@ -38,6 +38,10 @@ def bind_service(name, app_id, binding_options)
perform_request(Net::HTTP::Post, '/services/v1/bindings', body_hash)
end
+ def unbind_service(binding_token)
+ perform_request(Net::HTTP::Delete, "/services/v1/bindings/#{binding_token}")
+ end
+
def unprovision_service(name)
perform_request(Net::HTTP::Delete, "/services/v1/configurations/#{name}")
end
@@ -61,6 +61,15 @@
end
end
+ describe '#unbind_service' do
+ it 'should issue a delete request to /services/v1/bindings/:token' do
+ binding_token = "test_token"
+ uri = build_uri("/services/v1/bindings/#{binding_token}")
+ stub_request(:delete, uri)
+ @client.unbind_service(binding_token)
+ end
+ end
+
describe '#unprovision_service' do
it 'should issue a delete request to /services/v1/configurations/:name' do
service_name = "test_service"

0 comments on commit b2e290d

Please sign in to comment.