summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEspartaco Palma <esparta@gmail.com>2019-08-15 16:38:46 +0000
committerTakashi Kokubun <takashikkbn@gmail.com>2019-08-16 01:38:46 +0900
commit2665e5858f76e07ea8748a1931f500f961c5ceae (patch)
treea50c3a1115909a9fda7c5188362631b8e9802d04
parent2f919a92ba45d1174aa72498585ff7025142d9e3 (diff)
Adding missing test for Net::HTTPGenericRequest initializer (#1835)
A new exception is raised if an URI::HTTP is received and that object doesn't have a hostname property. Complementary to #1278
-rw-r--r--test/net/http/test_http_request.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/net/http/test_http_request.rb b/test/net/http/test_http_request.rb
index b7515b7..c1ad99a 100644
--- a/test/net/http/test_http_request.rb
+++ b/test/net/http/test_http_request.rb
@@ -75,6 +75,7 @@ class HTTPRequestTest < Test::Unit::TestCase
assert_equal "example.com", req['Host']
assert_raise(ArgumentError){ Net::HTTP::Get.new(URI("urn:ietf:rfc:7231")) }
+ assert_raise(ArgumentError){ Net::HTTP::Get.new(URI("http://")) }
end
def test_header_set