diff options
| author | mo khan <mo.khan@gmail.com> | 2020-01-14 15:36:49 -0700 |
|---|---|---|
| committer | mo khan <mo.khan@gmail.com> | 2020-01-14 15:36:49 -0700 |
| commit | cb36deaa0c8c3c60acc484d1e221f90f41896305 (patch) | |
| tree | b2534ad845df76dc3cd13e4d4ff001a50392204b /test/net/client_test.rb | |
| parent | cd0813cad397b3d1f25e40b7c0ed86f8f85c8026 (diff) | |
Fix bugs in following redirects
Diffstat (limited to 'test/net/client_test.rb')
| -rw-r--r-- | test/net/client_test.rb | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/test/net/client_test.rb b/test/net/client_test.rb index 098867b..78068d3 100644 --- a/test/net/client_test.rb +++ b/test/net/client_test.rb @@ -19,8 +19,6 @@ class ClientTest < Minitest::Test end def test_multiple_gets_to_pypi - return - VCR.use_cassette('multiple-gets-to-pypi') do %w{ https://pypi.org/pypi/django/1.11.3/json @@ -48,6 +46,16 @@ class ClientTest < Minitest::Test end end + def test_does_follow_redirects + VCR.use_cassette('does_follow_redirects') do + subject.follow_redirects = 10 + response = subject.get('https://pypi.org/pypi/django/1.11.3/json') + refute_nil response + assert_kind_of Net::HTTPOK, response + assert JSON.parse(response.body) + end + end + def test_get_with_redirects url = 'https://www.example.org/' n = 10 |
