diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2009-01-07 15:55:28 -0800 |
---|---|---|
committer | Yehuda Katz <wycats@gmail.com> | 2009-01-09 00:14:28 -0800 |
commit | 431e696b899dbc48afdfb842af73e8f75bf6b08c (patch) | |
tree | f276ce2740391e63bbdfdca2e126679ba6fcf482 /actionpack/test | |
parent | 72c983466651e9e4deaff15486de0da3918ff4be (diff) | |
download | rails-431e696b899dbc48afdfb842af73e8f75bf6b08c.tar.gz rails-431e696b899dbc48afdfb842af73e8f75bf6b08c.tar.bz2 rails-431e696b899dbc48afdfb842af73e8f75bf6b08c.zip |
Remove Content-Length header from :no_content responses
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/controller/render_test.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/actionpack/test/controller/render_test.rb b/actionpack/test/controller/render_test.rb index 5fd41d8eec..8809aa7c34 100644 --- a/actionpack/test/controller/render_test.rb +++ b/actionpack/test/controller/render_test.rb @@ -1218,6 +1218,11 @@ class RenderTest < ActionController::TestCase assert_equal "404 Not Found", @response.status assert_response :not_found + get :head_with_symbolic_status, :status => "no_content" + assert_equal "204 No Content", @response.status + assert !@response.headers.include?('Content-Length') + assert_response :no_content + ActionController::StatusCodes::SYMBOL_TO_STATUS_CODE.each do |status, code| get :head_with_symbolic_status, :status => status.to_s assert_equal code, @response.response_code @@ -1470,7 +1475,7 @@ class EtagRenderTest < ActionController::TestCase def test_render_against_etag_request_should_have_no_content_length_when_match @request.if_none_match = etag_for("hello david") get :render_hello_world_from_variable - assert !@response.headers.has_key?("Content-Length") + assert !@response.headers.has_key?("Content-Length"), @response.headers['Content-Length'] end def test_render_against_etag_request_should_200_when_no_match |