aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller
diff options
context:
space:
mode:
authorCheah Chu Yeow <chuyeow@gmail.com>2011-02-27 22:57:46 +0800
committerSantiago Pastorino <santiago@wyeworks.com>2011-03-02 13:11:07 -0200
commit2ee55557440a644453482a678e4ff08a4b5ebd3e (patch)
treed20cf2d49728bd79a7863d905bd3771ae1a2e65f /actionpack/test/controller
parente4cf28f3a0491620787d8e06d3a47918c5accc9b (diff)
downloadrails-2ee55557440a644453482a678e4ff08a4b5ebd3e.tar.gz
rails-2ee55557440a644453482a678e4ff08a4b5ebd3e.tar.bz2
rails-2ee55557440a644453482a678e4ff08a4b5ebd3e.zip
Fix Action caching bug where an action that has a non-cacheable response always renders a nil response body. It now correctly renders the response body.
Note that only GET and HTTP 200 responses can be cached. [#6480 state:committed] Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r--actionpack/test/controller/caching_test.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/actionpack/test/controller/caching_test.rb b/actionpack/test/controller/caching_test.rb
index cc393d3ef4..01f3e8f2b6 100644
--- a/actionpack/test/controller/caching_test.rb
+++ b/actionpack/test/controller/caching_test.rb
@@ -559,6 +559,11 @@ class ActionCacheTest < ActionController::TestCase
assert_response 404
end
+ def test_four_oh_four_renders_content
+ get :four_oh_four
+ assert_equal "404'd!", @response.body
+ end
+
def test_simple_runtime_error_returns_500_for_multiple_requests
get :simple_runtime_error
assert_response 500