diff options
author | Thom May <thom@chef.io> | 2016-02-09 14:20:35 -0800 |
---|---|---|
committer | Thom May <thom@chef.io> | 2016-02-09 14:20:35 -0800 |
commit | d17661e30c1e08a14d17dcfa6ce46f81086fc1ec (patch) | |
tree | dfcda354e2248d5d544b32b53b3b8debc97db592 /spec/unit | |
parent | b4b91836f0b2f0e09e089acab43e410cd73e48a4 (diff) | |
download | chef-d17661e30c1e08a14d17dcfa6ce46f81086fc1ec.tar.gz |
Ensure we do streaming requests correctly everywheretm/site_download_regression
Diffstat (limited to 'spec/unit')
-rw-r--r-- | spec/unit/knife/cookbook_show_spec.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/unit/knife/cookbook_show_spec.rb b/spec/unit/knife/cookbook_show_spec.rb index de6d569e1d..0183577ec1 100644 --- a/spec/unit/knife/cookbook_show_spec.rb +++ b/spec/unit/knife/cookbook_show_spec.rb @@ -126,7 +126,7 @@ describe Chef::Knife::CookbookShow do it "should print the raw result of the request (likely a file!)" do expect(@rest).to receive(:get).with("cookbooks/cookbook_name/0.1.0").and_return(@cookbook_response) - expect(@rest).to receive(:get).with("http://example.org/files/default.rb", true).and_return(StringIO.new(@response)) + expect(@rest).to receive(:streaming_request).with("http://example.org/files/default.rb").and_return(StringIO.new(@response)) expect(@knife).to receive(:pretty_print).with(@response) @knife.run end @@ -178,7 +178,7 @@ describe Chef::Knife::CookbookShow do @knife.config[:platform_version] = "1.0" @knife.config[:fqdn] = "examplehost.example.org" expect(@rest).to receive(:get).with("cookbooks/cookbook_name/0.1.0").and_return(@cookbook_response) - expect(@rest).to receive(:get).with("http://example.org/files/1111", true).and_return(StringIO.new(@response)) + expect(@rest).to receive(:streaming_request).with("http://example.org/files/1111").and_return(StringIO.new(@response)) expect(@knife).to receive(:pretty_print).with(@response) @knife.run end @@ -190,7 +190,7 @@ describe Chef::Knife::CookbookShow do @knife.config[:platform_version] = "1.0" @knife.config[:fqdn] = "differenthost.example.org" expect(@rest).to receive(:get).with("cookbooks/cookbook_name/0.1.0").and_return(@cookbook_response) - expect(@rest).to receive(:get).with("http://example.org/files/3333", true).and_return(StringIO.new(@response)) + expect(@rest).to receive(:streaming_request).with("http://example.org/files/3333").and_return(StringIO.new(@response)) expect(@knife).to receive(:pretty_print).with(@response) @knife.run end @@ -202,7 +202,7 @@ describe Chef::Knife::CookbookShow do @knife.config[:platform_version] = "9.10" @knife.config[:fqdn] = "differenthost.example.org" expect(@rest).to receive(:get).with("cookbooks/cookbook_name/0.1.0").and_return(@cookbook_response) - expect(@rest).to receive(:get).with("http://example.org/files/2222", true).and_return(StringIO.new(@response)) + expect(@rest).to receive(:streaming_request).with("http://example.org/files/2222").and_return(StringIO.new(@response)) expect(@knife).to receive(:pretty_print).with(@response) @knife.run end @@ -211,7 +211,7 @@ describe Chef::Knife::CookbookShow do describe "with none of the arguments, it should use the default" do it "should pass them all" do expect(@rest).to receive(:get).with("cookbooks/cookbook_name/0.1.0").and_return(@cookbook_response) - expect(@rest).to receive(:get).with("http://example.org/files/4444", true).and_return(StringIO.new(@response)) + expect(@rest).to receive(:streaming_request).with("http://example.org/files/4444").and_return(StringIO.new(@response)) expect(@knife).to receive(:pretty_print).with(@response) @knife.run end |