aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/caching_test.rb
diff options
context:
space:
mode:
authorPratik Naik <pratiknaik@gmail.com>2009-03-12 15:31:24 +0000
committerPratik Naik <pratiknaik@gmail.com>2009-03-12 15:31:24 +0000
commit53744c543880999a7ad3f1e026875df3283978f1 (patch)
tree8d01e0c15a384a46db176ad8d5cdd0bd6c9024a8 /actionpack/test/controller/caching_test.rb
parent053afbe3bd26d627ee04a0aaa73554b7be422f05 (diff)
parent47bdf3bf40ec17e1f8ca1c0e3d7f697d0c4cd1bf (diff)
downloadrails-53744c543880999a7ad3f1e026875df3283978f1.tar.gz
rails-53744c543880999a7ad3f1e026875df3283978f1.tar.bz2
rails-53744c543880999a7ad3f1e026875df3283978f1.zip
Merge commit 'mainstream/master'
Conflicts: actionpack/lib/action_view/helpers/text_helper.rb activesupport/lib/active_support/inflector.rb
Diffstat (limited to 'actionpack/test/controller/caching_test.rb')
-rw-r--r--actionpack/test/controller/caching_test.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/actionpack/test/controller/caching_test.rb b/actionpack/test/controller/caching_test.rb
index 9af1ccc740..86dafd9221 100644
--- a/actionpack/test/controller/caching_test.rb
+++ b/actionpack/test/controller/caching_test.rb
@@ -428,6 +428,20 @@ class ActionCacheTest < ActionController::TestCase
assert_equal 'application/xml', @response.content_type
end
+ def test_correct_content_type_is_returned_for_cache_hit_on_action_with_string_key
+ # run it twice to cache it the first time
+ get :show, :format => 'xml'
+ get :show, :format => 'xml'
+ assert_equal 'application/xml', @response.content_type
+ end
+
+ def test_correct_content_type_is_returned_for_cache_hit_on_action_with_string_key_from_proc
+ # run it twice to cache it the first time
+ get :edit, :id => 1, :format => 'xml'
+ get :edit, :id => 1, :format => 'xml'
+ assert_equal 'application/xml', @response.content_type
+ end
+
def test_empty_path_is_normalized
@mock_controller.mock_url_for = 'http://example.org/'
@mock_controller.mock_path = '/'