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
This commit is contained in:
parent
2f919a92ba
commit
2665e5858f
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user