test/proxy_test.rb in geocoder-1.1.8 vs test/proxy_test.rb in geocoder-1.1.9
- old
+ new
@@ -18,6 +18,19 @@
Geocoder.configure(:http_proxy => ' \\_O< Quack Quack')
assert_raise Geocoder::ConfigurationError do
Geocoder::Lookup::Google.new.send(:http_client)
end
end
+
+ def test_accepts_proxy_with_http_protocol
+ Geocoder.configure(:http_proxy => 'http://localhost')
+ lookup = Geocoder::Lookup::Google.new
+ assert lookup.send(:http_client).proxy_class?
+ end
+
+ def test_accepts_proxy_with_https_protocol
+ Geocoder.configure(:https_proxy => 'https://localhost')
+ Geocoder.configure(:use_https => true)
+ lookup = Geocoder::Lookup::Google.new
+ assert lookup.send(:http_client).proxy_class?
+ end
end