aboutsummaryrefslogtreecommitdiffstats
path: root/test/uri/test_generic.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/uri/test_generic.rb')
-rw-r--r--test/uri/test_generic.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/uri/test_generic.rb b/test/uri/test_generic.rb
index 9c0b6051a7..2d4603ca44 100644
--- a/test/uri/test_generic.rb
+++ b/test/uri/test_generic.rb
@@ -758,6 +758,14 @@ class URI::TestGeneric < Test::Unit::TestCase
assert_equal(URI('http://127.0.0.1:8080'), URI("http://192.0.2.1/").find_proxy)
assert_nil(URI("http://192.0.2.2/").find_proxy)
}
+ with_env('http_proxy'=>'') {
+ assert_equal(URI(''), URI("http://192.0.2.1/").find_proxy)
+ assert_nil(URI("ftp://192.0.2.1/").find_proxy)
+ }
+ with_env('ftp_proxy'=>'') {
+ assert_nil(URI("http://192.0.2.1/").find_proxy)
+ assert_equal(URI(''), URI("ftp://192.0.2.1/").find_proxy)
+ }
end
def test_find_proxy_case_sensitive_env