diff options
author | Jon Morrow <jon@morrowmail.com> | 2015-05-07 10:11:55 -0700 |
---|---|---|
committer | Jon Morrow <jon@morrowmail.com> | 2015-05-07 13:54:16 -0700 |
commit | 7bb5560abbd579820a26ff43d0bfec336f4b9a2f (patch) | |
tree | a4acc81cadb0a20bf2a994705e8d4cbfc2f54d11 | |
parent | d3b6b1169978be7cac457a02771b9f417d779c93 (diff) | |
download | chef-fix-empty-proxy.tar.gz |
Add regression test.fix-empty-proxy
-rw-r--r-- | spec/unit/http/basic_client_spec.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/unit/http/basic_client_spec.rb b/spec/unit/http/basic_client_spec.rb index 32b32a5f4c..b7552f54aa 100644 --- a/spec/unit/http/basic_client_spec.rb +++ b/spec/unit/http/basic_client_spec.rb @@ -109,5 +109,21 @@ describe "HTTP Connection" do end end + + context "when an empty proxy is set by the environment" do + let(:env) do + { + "https_proxy" => "" + } + end + + before do + allow(subject).to receive(:env).and_return(env) + end + + it "to not fail with URI parse exception" do + expect { subject.proxy_uri }.to_not raise_error + end + end end end |