mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
1 changed files with 1 additions and 0 deletions
|
@ -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…
Reference in a new issue