summaryrefslogtreecommitdiff
path: root/spec/functional
diff options
context:
space:
mode:
authorThom May <thom@chef.io>2015-12-02 12:19:33 +0000
committerThom May <thom@chef.io>2016-01-11 15:40:42 +0000
commitd99e306a41b1402209d320cb7119b12a3bbb962f (patch)
treef65940702826deb991e6198967d3e9e96cb2857a /spec/functional
parent1b71aeb423b009f6d1a44215c89e9976957b47e9 (diff)
downloadchef-d99e306a41b1402209d320cb7119b12a3bbb962f.tar.gz
Convert all uses of Chef::REST to Chef::ServerAPItm/no_more_rest
In the process, stop auto-expanding JSON in the HTTP client, and let individual classes control that themselves. Fixes #2737, Fixes #3518
Diffstat (limited to 'spec/functional')
-rw-r--r--spec/functional/resource/registry_spec.rb2
-rw-r--r--spec/functional/tiny_server_spec.rb4
2 files changed, 3 insertions, 3 deletions
diff --git a/spec/functional/resource/registry_spec.rb b/spec/functional/resource/registry_spec.rb
index f112ad9b00..c0682fefc8 100644
--- a/spec/functional/resource/registry_spec.rb
+++ b/spec/functional/resource/registry_spec.rb
@@ -111,7 +111,7 @@ describe Chef::Resource::RegistryKey, :windows_only, :broken => true do
before do
@node.name("windowsbox")
- @rest_client = double("Chef::REST (mock)")
+ @rest_client = double("Chef::ServerAPI (mock)")
allow(@rest_client).to receive(:create_url).and_return("reports/nodes/windowsbox/runs/#{@run_id}");
allow(@rest_client).to receive(:raw_http_request).and_return({"result"=>"ok"});
allow(@rest_client).to receive(:post_rest).and_return({"uri"=>"https://example.com/reports/nodes/windowsbox/runs/#{@run_id}"});
diff --git a/spec/functional/tiny_server_spec.rb b/spec/functional/tiny_server_spec.rb
index 87be948a0d..d21248062a 100644
--- a/spec/functional/tiny_server_spec.rb
+++ b/spec/functional/tiny_server_spec.rb
@@ -70,8 +70,8 @@ describe TinyServer::Manager do
TinyServer::API.instance.get("/index", 200, "[\"hello\"]")
- rest = Chef::REST.new('http://localhost:9000', false, false)
- expect(rest.get_rest("index")).to eq(["hello"])
+ rest = Chef::HTTP.new('http://localhost:9000')
+ expect(rest.get("index")).to eq("[\"hello\"]")
@server.stop
end