diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2008-06-03 22:38:27 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2008-06-03 22:38:27 -0700 |
commit | 53bcbfbdc1eed45cc6615e59d36baf018ab43d96 (patch) | |
tree | 691441d50ef7e49b5317ce279329bcaa1d135744 /actionpack/test/controller/caching_test.rb | |
parent | f55ad960d22337d0d92a93724f1cc3ad45200836 (diff) | |
parent | 82e96eb294ae21528c3e05e91c05c7ee5222afbd (diff) | |
download | rails-53bcbfbdc1eed45cc6615e59d36baf018ab43d96.tar.gz rails-53bcbfbdc1eed45cc6615e59d36baf018ab43d96.tar.bz2 rails-53bcbfbdc1eed45cc6615e59d36baf018ab43d96.zip |
Merge branch 'master' into erbout
Diffstat (limited to 'actionpack/test/controller/caching_test.rb')
-rw-r--r-- | actionpack/test/controller/caching_test.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/actionpack/test/controller/caching_test.rb b/actionpack/test/controller/caching_test.rb index 8b3ddc7603..aee60b1c6f 100644 --- a/actionpack/test/controller/caching_test.rb +++ b/actionpack/test/controller/caching_test.rb @@ -156,6 +156,7 @@ class ActionCachingTestController < ActionController::Base caches_action :show, :cache_path => 'http://test.host/custom/show' caches_action :edit, :cache_path => Proc.new { |c| c.params[:id] ? "http://test.host/#{c.params[:id]};edit" : "http://test.host/edit" } caches_action :with_layout + caches_action :layout_false, :layout => false layout 'talk_from_action.erb' @@ -181,6 +182,7 @@ class ActionCachingTestController < ActionController::Base alias_method :show, :index alias_method :edit, :index alias_method :destroy, :index + alias_method :layout_false, :with_layout def expire expire_action :controller => 'action_caching_test', :action => 'index' @@ -263,6 +265,19 @@ class ActionCacheTest < Test::Unit::TestCase assert_equal @response.body, read_fragment('hostname.com/action_caching_test/with_layout') end + def test_action_cache_with_layout_and_layout_cache_false + get :layout_false + cached_time = content_to_cache + assert_not_equal cached_time, @response.body + assert fragment_exist?('hostname.com/action_caching_test/layout_false') + reset! + + get :layout_false + assert_not_equal cached_time, @response.body + + assert_equal cached_time, read_fragment('hostname.com/action_caching_test/layout_false') + end + def test_action_cache_conditional_options @request.env['HTTP_ACCEPT'] = 'application/json' get :index |