summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authormokha <mokha@cisco.com>2018-05-24 16:27:43 -0600
committermokha <mokha@cisco.com>2018-05-24 16:28:01 -0600
commitd4b1c5d81bcba19c1092f720b5bd523600c99b3c (patch)
tree44dec2a83dadf0f8bded57a785589c3a4d359d3a /test
parent08a3bebc663ca31c9f15e6698c78262a94ecae2d (diff)
add support for URI::Generic.
Diffstat (limited to 'test')
-rw-r--r--test/net/client_test.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/net/client_test.rb b/test/net/client_test.rb
index 499f54c..c71943c 100644
--- a/test/net/client_test.rb
+++ b/test/net/client_test.rb
@@ -25,6 +25,15 @@ class ClientTest < Minitest::Test
end
end
+ def test_get_with_generic_uri
+ VCR.use_cassette('get_breaches') do
+ uri = URI::Generic.build(host: 'haveibeenpwned.com', scheme: 'https', path: '/api/breaches', port: 443)
+ response = subject.get(uri)
+ refute_nil response
+ assert_equal(283, JSON.parse(response.body).count)
+ end
+ end
+
def test_get_with_block_syntax
VCR.use_cassette('get_breaches') do
uri = URI.parse('https://haveibeenpwned.com/api/breaches')