summaryrefslogtreecommitdiff
path: root/spec/unit/rest_spec.rb
diff options
context:
space:
mode:
authordanielsdeleo <dan@getchef.com>2015-03-31 12:45:13 -0700
committerdanielsdeleo <dan@getchef.com>2015-04-01 13:35:01 -0700
commitf066fef19be99ba1b857ecaaabc4c70c9201f1d4 (patch)
tree3b3ef4f4ba872071949814eae60c4267e91b3a65 /spec/unit/rest_spec.rb
parentaab0ccb5d41913e050707bd6b40e5b820649c566 (diff)
downloadchef-f066fef19be99ba1b857ecaaabc4c70c9201f1d4.tar.gz
Test base HTTP client behaviors for chefzero URL case
Diffstat (limited to 'spec/unit/rest_spec.rb')
-rw-r--r--spec/unit/rest_spec.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/unit/rest_spec.rb b/spec/unit/rest_spec.rb
index 1aa7ac84ee..85c9e3df8f 100644
--- a/spec/unit/rest_spec.rb
+++ b/spec/unit/rest_spec.rb
@@ -92,6 +92,15 @@ describe Chef::REST do
Chef::REST.new(base_url, nil, nil, options)
end
+ context 'when created with a chef zero URL' do
+
+ let(:url) { "chefzero://localhost:1" }
+
+ it "does not load the signing key" do
+ expect { Chef::REST.new(url) }.to_not raise_error
+ end
+ end
+
describe "calling an HTTP verb on a path or absolute URL" do
it "adds a relative URL to the base url it was initialized with" do
expect(rest.create_url("foo/bar/baz")).to eq(URI.parse(base_url + "/foo/bar/baz"))