diff options
author | Eric Wong <e@80x24.org> | 2017-12-22 02:33:48 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2017-12-22 03:14:34 +0000 |
commit | 2dedd116c95c5e675f37b053a8f09c8b3a294db6 (patch) | |
tree | 122d20722a6b268ea1fa1a1f23d9a32e93c0df36 /test/unit/test_request.rb | |
parent | 30e3c6abe542c6a9f5955e1d65896a0c3bab534f (diff) | |
download | unicorn-2dedd116c95c5e675f37b053a8f09c8b3a294db6.tar.gz |
Add a new "check-warnings" target to the GNUmakefile to make checking for this easier. Warnings aren't fatal, and newer versions of Ruby tend to increase warnings.
Diffstat (limited to 'test/unit/test_request.rb')
-rw-r--r-- | test/unit/test_request.rb | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/test/unit/test_request.rb b/test/unit/test_request.rb index f0ccaf7..6cb0268 100644 --- a/test/unit/test_request.rb +++ b/test/unit/test_request.rb @@ -34,7 +34,7 @@ class RequestTest < Test::Unit::TestCase assert_equal '', env['REQUEST_PATH'] assert_equal '', env['PATH_INFO'] assert_equal '*', env['REQUEST_URI'] - res = @lint.call(env) + assert_kind_of Array, @lint.call(env) end def test_absolute_uri_with_query @@ -44,7 +44,7 @@ class RequestTest < Test::Unit::TestCase assert_equal '/x', env['REQUEST_PATH'] assert_equal '/x', env['PATH_INFO'] assert_equal 'y=z', env['QUERY_STRING'] - res = @lint.call(env) + assert_kind_of Array, @lint.call(env) end def test_absolute_uri_with_fragment @@ -55,7 +55,7 @@ class RequestTest < Test::Unit::TestCase assert_equal '/x', env['PATH_INFO'] assert_equal '', env['QUERY_STRING'] assert_equal 'frag', env['FRAGMENT'] - res = @lint.call(env) + assert_kind_of Array, @lint.call(env) end def test_absolute_uri_with_query_and_fragment @@ -66,7 +66,7 @@ class RequestTest < Test::Unit::TestCase assert_equal '/x', env['PATH_INFO'] assert_equal 'a=b', env['QUERY_STRING'] assert_equal 'frag', env['FRAGMENT'] - res = @lint.call(env) + assert_kind_of Array, @lint.call(env) end def test_absolute_uri_unsupported_schemes @@ -83,7 +83,7 @@ class RequestTest < Test::Unit::TestCase "Host: foo\r\n\r\n") env = @request.read(client) assert_equal "https", env['rack.url_scheme'] - res = @lint.call(env) + assert_kind_of Array, @lint.call(env) end def test_x_forwarded_proto_http @@ -92,7 +92,7 @@ class RequestTest < Test::Unit::TestCase "Host: foo\r\n\r\n") env = @request.read(client) assert_equal "http", env['rack.url_scheme'] - res = @lint.call(env) + assert_kind_of Array, @lint.call(env) end def test_x_forwarded_proto_invalid @@ -101,7 +101,7 @@ class RequestTest < Test::Unit::TestCase "Host: foo\r\n\r\n") env = @request.read(client) assert_equal "http", env['rack.url_scheme'] - res = @lint.call(env) + assert_kind_of Array, @lint.call(env) end def test_rack_lint_get @@ -109,7 +109,7 @@ class RequestTest < Test::Unit::TestCase env = @request.read(client) assert_equal "http", env['rack.url_scheme'] assert_equal '127.0.0.1', env['REMOTE_ADDR'] - res = @lint.call(env) + assert_kind_of Array, @lint.call(env) end def test_no_content_stringio @@ -143,7 +143,7 @@ class RequestTest < Test::Unit::TestCase "abcde") env = @request.read(client) assert ! env.include?(:http_body) - res = @lint.call(env) + assert_kind_of Array, @lint.call(env) end def test_rack_lint_big_put @@ -177,6 +177,6 @@ class RequestTest < Test::Unit::TestCase } assert_nil env['rack.input'].read(bs) env['rack.input'].rewind - res = @lint.call(env) + assert_kind_of Array, @lint.call(env) end end |