aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/caching_test.rb
diff options
context:
space:
mode:
authorRick Olson <technoweenie@gmail.com>2007-08-20 01:12:43 +0000
committerRick Olson <technoweenie@gmail.com>2007-08-20 01:12:43 +0000
commit1a459e8e7d9f32e6c3a55153e8e1cfabef881839 (patch)
tree40bbe483e56b3e0a5b5a8a60e23e0090ff328481 /actionpack/test/controller/caching_test.rb
parentbba22cedb4f3fc2554ab54175be3e20a701d53c8 (diff)
downloadrails-1a459e8e7d9f32e6c3a55153e8e1cfabef881839.tar.gz
rails-1a459e8e7d9f32e6c3a55153e8e1cfabef881839.tar.bz2
rails-1a459e8e7d9f32e6c3a55153e8e1cfabef881839.zip
Fix bug where action caching sets the content type to the ActionCachePath object. Closes #9282 [mindforge]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7346 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test/controller/caching_test.rb')
-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 29fa0074f7..a9bc0471df 100644
--- a/actionpack/test/controller/caching_test.rb
+++ b/actionpack/test/controller/caching_test.rb
@@ -279,6 +279,11 @@ class ActionCacheTest < Test::Unit::TestCase
assert_equal 'xml', path_object.extension
assert_equal 'example.org/posts/index.xml', path_object.path
end
+
+ def test_correct_content_type_is_returned_for_cache_hit
+ get :index, :id => 'content-type.xml'
+ assert_equal 'application/xml', @response.content_type
+ end
def test_empty_path_is_normalized
@mock_controller.mock_url_for = 'http://example.org/'