diff options
Diffstat (limited to 'actionpack/test/dispatch')
-rw-r--r-- | actionpack/test/dispatch/request_test.rb | 2 | ||||
-rw-r--r-- | actionpack/test/dispatch/response_test.rb | 10 | ||||
-rw-r--r-- | actionpack/test/dispatch/session/cookie_store_test.rb | 1 |
3 files changed, 6 insertions, 7 deletions
diff --git a/actionpack/test/dispatch/request_test.rb b/actionpack/test/dispatch/request_test.rb index 75b674ec1a..dd5bf5ec2d 100644 --- a/actionpack/test/dispatch/request_test.rb +++ b/actionpack/test/dispatch/request_test.rb @@ -427,7 +427,7 @@ class RequestTest < ActiveSupport::TestCase begin request = stub_request(mock_rack_env) request.parameters - rescue TypeError => e + rescue TypeError # rack will raise a TypeError when parsing this query string end assert_equal({}, request.parameters) diff --git a/actionpack/test/dispatch/response_test.rb b/actionpack/test/dispatch/response_test.rb index ab26d1a645..6f38714b2e 100644 --- a/actionpack/test/dispatch/response_test.rb +++ b/actionpack/test/dispatch/response_test.rb @@ -18,7 +18,7 @@ class ResponseTest < ActiveSupport::TestCase body.each { |part| parts << part } assert_equal ["Hello, World!"], parts end - + test "status handled properly in initialize" do assert_equal 200, ActionDispatch::Response.new('200 OK').status end @@ -26,7 +26,7 @@ class ResponseTest < ActiveSupport::TestCase test "utf8 output" do @response.body = [1090, 1077, 1089, 1090].pack("U*") - status, headers, body = @response.to_a + status, headers, _ = @response.to_a assert_equal 200, status assert_equal({ "Content-Type" => "text/html; charset=utf-8" @@ -52,20 +52,20 @@ class ResponseTest < ActiveSupport::TestCase test "content type" do [204, 304].each do |c| @response.status = c.to_s - status, headers, body = @response.to_a + _, headers, _ = @response.to_a assert !headers.has_key?("Content-Type"), "#{c} should not have Content-Type header" end [200, 302, 404, 500].each do |c| @response.status = c.to_s - status, headers, body = @response.to_a + _, headers, _ = @response.to_a assert headers.has_key?("Content-Type"), "#{c} did not have Content-Type header" end end test "does not include Status header" do @response.status = "200 OK" - status, headers, body = @response.to_a + _, headers, _ = @response.to_a assert !headers.has_key?('Status') end diff --git a/actionpack/test/dispatch/session/cookie_store_test.rb b/actionpack/test/dispatch/session/cookie_store_test.rb index 256d0781c7..27f55fd7ab 100644 --- a/actionpack/test/dispatch/session/cookie_store_test.rb +++ b/actionpack/test/dispatch/session/cookie_store_test.rb @@ -194,7 +194,6 @@ class CookieStoreTest < ActionDispatch::IntegrationTest with_test_route_set do get '/set_session_value' assert_response :success - session_payload = response.body assert_equal "_myapp_session=#{response.body}; path=/; HttpOnly", headers['Set-Cookie'] |