diff options
author | Thom May <thom@chef.io> | 2015-12-02 12:19:33 +0000 |
---|---|---|
committer | Thom May <thom@chef.io> | 2016-01-11 15:40:42 +0000 |
commit | d99e306a41b1402209d320cb7119b12a3bbb962f (patch) | |
tree | f65940702826deb991e6198967d3e9e96cb2857a /spec/unit/cookbook_uploader_spec.rb | |
parent | 1b71aeb423b009f6d1a44215c89e9976957b47e9 (diff) | |
download | chef-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/unit/cookbook_uploader_spec.rb')
-rw-r--r-- | spec/unit/cookbook_uploader_spec.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/unit/cookbook_uploader_spec.rb b/spec/unit/cookbook_uploader_spec.rb index 76727c18e2..a08b6b29d0 100644 --- a/spec/unit/cookbook_uploader_spec.rb +++ b/spec/unit/cookbook_uploader_spec.rb @@ -20,7 +20,7 @@ require 'spec_helper' describe Chef::CookbookUploader do - let(:http_client) { double("Chef::REST") } + let(:http_client) { double("Chef::ServerAPI") } let(:cookbook_loader) do loader = Chef::CookbookLoader.new(File.join(CHEF_SPEC_DATA, "cookbooks")) @@ -64,8 +64,8 @@ describe Chef::CookbookUploader do end it "creates an HTTP client with default configuration when not initialized with one" do - default_http_client = double("Chef::REST") - expect(Chef::REST).to receive(:new).with(Chef::Config[:chef_server_url]).and_return(default_http_client) + default_http_client = double("Chef::ServerAPI") + expect(Chef::ServerAPI).to receive(:new).with(Chef::Config[:chef_server_url]).and_return(default_http_client) uploader = described_class.new(cookbooks_to_upload) expect(uploader.rest).to eq(default_http_client) end |