summaryrefslogtreecommitdiff
path: root/test/open-uri/test_open-uri.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/open-uri/test_open-uri.rb')
-rw-r--r--test/open-uri/test_open-uri.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/open-uri/test_open-uri.rb b/test/open-uri/test_open-uri.rb
index 3feed423a0..0301483902 100644
--- a/test/open-uri/test_open-uri.rb
+++ b/test/open-uri/test_open-uri.rb
@@ -68,6 +68,16 @@ class TestOpenURI < Test::Unit::TestCase
@proxies.each_with_index {|k, i| ENV[k] = @old_proxies[i] }
end
+ def test_200_uri_open
+ with_http {|srv, dr, url|
+ srv.mount_proc("/urifoo200", lambda { |req, res| res.body = "urifoo200" } )
+ URI.open("#{url}/urifoo200") {|f|
+ assert_equal("200", f.status[0])
+ assert_equal("urifoo200", f.read)
+ }
+ }
+ end
+
def test_200
with_http {|srv, dr, url|
srv.mount_proc("/foo200", lambda { |req, res| res.body = "foo200" } )