summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorThom May <thom@chef.io>2016-07-07 14:09:25 +0100
committerThom May <thom@chef.io>2016-07-14 17:44:31 -0500
commitd5299f1e1c71c777a54912fa4346607dda3c3e95 (patch)
tree5c6c9d02f1fe646c8e703556780e58ed1d60433e /spec
parentf8f450d85e36befe32dba833e0194943d4b68a15 (diff)
downloadchef-tm/fix_supermarket_share_error.tar.gz
We don't care so much about categories on the supermarkettm/fix_supermarket_share_error
Signed-off-by: Thom May <thom@may.lt>
Diffstat (limited to 'spec')
-rw-r--r--spec/unit/knife/cookbook_site_share_spec.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/unit/knife/cookbook_site_share_spec.rb b/spec/unit/knife/cookbook_site_share_spec.rb
index 9339114d2a..5ac48539e4 100644
--- a/spec/unit/knife/cookbook_site_share_spec.rb
+++ b/spec/unit/knife/cookbook_site_share_spec.rb
@@ -83,11 +83,11 @@ describe Chef::Knife::CookbookSiteShare do
@knife.run
end
- it "should print error and exit when given only 1 argument and cannot determine category" do
+ it "should use a default category when given only 1 argument and cannot determine category" do
@knife.name_args = ["cookbook_name"]
- expect(@noauth_rest).to receive(:get).with("https://supermarket.chef.io/api/v1/cookbooks/cookbook_name").and_return(@bad_category_response)
- expect(@knife.ui).to receive(:fatal)
- expect { @knife.run }.to raise_error(SystemExit)
+ expect(@noauth_rest).to receive(:get).with("https://supermarket.chef.io/api/v1/cookbooks/cookbook_name") { raise Net::HTTPServerException.new("404 Not Found", OpenStruct.new(code: "404")) }
+ expect(@knife).to receive(:do_upload)
+ expect { @knife.run }.to_not raise_error
end
it "should print error and exit when given only 1 argument and Chef::ServerAPI throws an exception" do