diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2009-05-04 08:35:35 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2009-05-04 08:35:35 -0700 |
commit | 8b6d2ef2f562c34ebc2ef547b0a18c31f5820569 (patch) | |
tree | b1397a8374b465ea2f300e776de126bb88386bcc /actionpack/test/controller/caching_test.rb | |
parent | d3ee8756c8b09b8524a9599926b02ededd27319c (diff) | |
parent | bcc4537f2a0d37fc02d67e9564fa5c9c5555b3d5 (diff) | |
download | rails-8b6d2ef2f562c34ebc2ef547b0a18c31f5820569.tar.gz rails-8b6d2ef2f562c34ebc2ef547b0a18c31f5820569.tar.bz2 rails-8b6d2ef2f562c34ebc2ef547b0a18c31f5820569.zip |
Merge branch 'master' of git@github.com:rails/rails
Diffstat (limited to 'actionpack/test/controller/caching_test.rb')
-rw-r--r-- | actionpack/test/controller/caching_test.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/actionpack/test/controller/caching_test.rb b/actionpack/test/controller/caching_test.rb index 6b9d1056a3..560c09509b 100644 --- a/actionpack/test/controller/caching_test.rb +++ b/actionpack/test/controller/caching_test.rb @@ -149,6 +149,9 @@ class PageCachingTest < ActionController::TestCase end class ActionCachingTestController < ActionController::Base + rescue_from(Exception) { head 500 } + rescue_from(ActiveRecord::RecordNotFound) { head :not_found } + caches_action :index, :redirected, :forbidden, :if => Proc.new { |c| !c.request.format.json? }, :expires_in => 1.hour 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" } |