summaryrefslogtreecommitdiff
path: root/spec/support/shared/functional/http.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/support/shared/functional/http.rb')
-rw-r--r--spec/support/shared/functional/http.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/support/shared/functional/http.rb b/spec/support/shared/functional/http.rb
index c362ecaa18..d3214b77f1 100644
--- a/spec/support/shared/functional/http.rb
+++ b/spec/support/shared/functional/http.rb
@@ -155,6 +155,22 @@ module ChefHTTPShared
}
)
+ #
+ # RESTful endpoints
+ #
+ json_response = <<-EOF
+{
+ "foo": "https://api.opscode.com/organizations/scriptkiddie/nodes/foo",
+ "bar": "https://api.opscode.com/organizations/scriptkiddie/nodes/bar"
+}
+ EOF
+ @api.get('/nodes', 200, json_response,
+ {
+ 'Content-Type' => 'application/json',
+ 'Content-Length' => json_response.bytesize.to_s,
+ }
+ )
+
end
def stop_tiny_server