diff options
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r-- | actionpack/test/controller/caching_test.rb | 2 | ||||
-rw-r--r-- | actionpack/test/controller/rack_test.rb | 6 | ||||
-rw-r--r-- | actionpack/test/controller/render_test.rb | 4 | ||||
-rw-r--r-- | actionpack/test/controller/send_file_test.rb | 4 |
4 files changed, 8 insertions, 8 deletions
diff --git a/actionpack/test/controller/caching_test.rb b/actionpack/test/controller/caching_test.rb index ddf140ac3a..e24bb00bc7 100644 --- a/actionpack/test/controller/caching_test.rb +++ b/actionpack/test/controller/caching_test.rb @@ -169,7 +169,7 @@ class ActionCachingTestController < ActionController::Base def forbidden render :text => "Forbidden" - headers["Status"] = "403 Forbidden" + response.status = "403 Forbidden" end def with_layout diff --git a/actionpack/test/controller/rack_test.rb b/actionpack/test/controller/rack_test.rb index 3a8a00b7d7..51f43290d2 100644 --- a/actionpack/test/controller/rack_test.rb +++ b/actionpack/test/controller/rack_test.rb @@ -271,17 +271,17 @@ class RackResponseHeadersTest < BaseRackTest def setup super @response = ActionController::RackResponse.new - @response.headers['Status'] = "200 OK" + @response.status = "200 OK" end def test_content_type [204, 304].each do |c| - @response.headers['Status'] = c.to_s + @response.status = c.to_s assert !response_headers.has_key?("Content-Type"), "#{c} should not have Content-Type header" end [200, 302, 404, 500].each do |c| - @response.headers['Status'] = c.to_s + @response.status = c.to_s assert response_headers.has_key?("Content-Type"), "#{c} did not have Content-Type header" end end diff --git a/actionpack/test/controller/render_test.rb b/actionpack/test/controller/render_test.rb index a6721fd903..e0f05d654c 100644 --- a/actionpack/test/controller/render_test.rb +++ b/actionpack/test/controller/render_test.rb @@ -1147,11 +1147,11 @@ class RenderTest < ActionController::TestCase def test_head_with_symbolic_status get :head_with_symbolic_status, :status => "ok" - assert_equal "200 OK", @response.headers["Status"] + assert_equal "200 OK", @response.status assert_response :ok get :head_with_symbolic_status, :status => "not_found" - assert_equal "404 Not Found", @response.headers["Status"] + assert_equal "404 Not Found", @response.status assert_response :not_found ActionController::StatusCodes::SYMBOL_TO_STATUS_CODE.each do |status, code| diff --git a/actionpack/test/controller/send_file_test.rb b/actionpack/test/controller/send_file_test.rb index ffbaa457f8..c4349bfc7f 100644 --- a/actionpack/test/controller/send_file_test.rb +++ b/actionpack/test/controller/send_file_test.rb @@ -123,13 +123,13 @@ class SendFileTest < Test::Unit::TestCase define_method "test_send_#{method}_status" do @controller.options = { :stream => false, :status => 500 } assert_nothing_raised { assert_not_nil process(method) } - assert_equal '500 Internal Server Error', @response.headers['Status'] + assert_equal '500 Internal Server Error', @response.status end define_method "test_default_send_#{method}_status" do @controller.options = { :stream => false } assert_nothing_raised { assert_not_nil process(method) } - assert_equal ActionController::Base::DEFAULT_RENDER_STATUS_CODE, @response.headers['Status'] + assert_equal ActionController::Base::DEFAULT_RENDER_STATUS_CODE, @response.status end end end |