aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
authorYehuda Katz <wycats@gmail.com>2009-07-30 21:32:24 -0700
committerYehuda Katz <wycats@gmail.com>2009-08-02 19:39:33 -0400
commitb53f00690173797a39ff46e55dd25c20581c3d00 (patch)
treea8919d6e0c7029935a92a7fdbf7d373ce1684566 /actionpack/test
parent503ce1d01ce6c8eee9818f4e76a9f880bb1a291d (diff)
downloadrails-b53f00690173797a39ff46e55dd25c20581c3d00.tar.gz
rails-b53f00690173797a39ff46e55dd25c20581c3d00.tar.bz2
rails-b53f00690173797a39ff46e55dd25c20581c3d00.zip
Remove legacy processing and content_length
* convert_content_type! is handled by assign_default_content_type_and_charset! * set_content_length! should be handled by the endpoint server. Otherwise each middleware that modifies the body has to do the expensive work of recalculating content_length. * convert_language! appears to be legacy. There are no tests for this * convert_cookies! should be handled by the new HeaderHash in Rack * Use an integer for .status's internal representation to avoid needing to do String manipulation just to find out the status
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/dispatch/request/multipart_params_parsing_test.rb2
-rw-r--r--actionpack/test/dispatch/response_test.rb6
-rw-r--r--actionpack/test/new_base/base_test.rb3
3 files changed, 2 insertions, 9 deletions
diff --git a/actionpack/test/dispatch/request/multipart_params_parsing_test.rb b/actionpack/test/dispatch/request/multipart_params_parsing_test.rb
index 9e008a9ae8..301080842e 100644
--- a/actionpack/test/dispatch/request/multipart_params_parsing_test.rb
+++ b/actionpack/test/dispatch/request/multipart_params_parsing_test.rb
@@ -120,8 +120,6 @@ class MultipartParamsParsingTest < ActionController::IntegrationTest
fixture = FIXTURE_PATH + "/mona_lisa.jpg"
params = { :uploaded_data => fixture_file_upload(fixture, "image/jpg") }
post '/read', params
- expected_length = 'File: '.length + File.size(fixture)
- assert_equal expected_length, response.content_length
end
end
diff --git a/actionpack/test/dispatch/response_test.rb b/actionpack/test/dispatch/response_test.rb
index 2b1540c678..256ed06a45 100644
--- a/actionpack/test/dispatch/response_test.rb
+++ b/actionpack/test/dispatch/response_test.rb
@@ -15,8 +15,7 @@ class ResponseTest < ActiveSupport::TestCase
"Content-Type" => "text/html; charset=utf-8",
"Cache-Control" => "max-age=0, private, must-revalidate",
"ETag" => '"65a8e27d8879283831b664bd8b7f0ad4"',
- "Set-Cookie" => "",
- "Content-Length" => "13"
+ "Set-Cookie" => ""
}, headers)
parts = []
@@ -34,8 +33,7 @@ class ResponseTest < ActiveSupport::TestCase
"Content-Type" => "text/html; charset=utf-8",
"Cache-Control" => "max-age=0, private, must-revalidate",
"ETag" => '"ebb5e89e8a94e9dd22abf5d915d112b2"',
- "Set-Cookie" => "",
- "Content-Length" => "8"
+ "Set-Cookie" => ""
}, headers)
end
diff --git a/actionpack/test/new_base/base_test.rb b/actionpack/test/new_base/base_test.rb
index d9d552f9e5..1b2e917ced 100644
--- a/actionpack/test/new_base/base_test.rb
+++ b/actionpack/test/new_base/base_test.rb
@@ -34,7 +34,6 @@ module Dispatching
assert_body "success"
assert_status 200
assert_content_type "text/html; charset=utf-8"
- assert_header "Content-Length", "7"
end
# :api: plugin
@@ -42,7 +41,6 @@ module Dispatching
get "/dispatching/simple/modify_response_body"
assert_body "success"
- assert_header "Content-Length", "7" # setting the body manually sets the content length
end
# :api: plugin
@@ -50,7 +48,6 @@ module Dispatching
get "/dispatching/simple/modify_response_body_twice"
assert_body "success!"
- assert_header "Content-Length", "8"
end
test "controller path" do