aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2008-10-21 02:54:55 +0200
committerDavid Heinemeier Hansson <david@loudthinking.com>2008-10-21 02:54:55 +0200
commit448e7e7c04260c34b816eb951427fc4409843cc8 (patch)
tree206b5aa0ae1ae36a8364166c7d8227e1427aae5a /actionpack/test/controller
parent68d84e259346c1bc3d8fd546162e5a93caf0bbdc (diff)
downloadrails-448e7e7c04260c34b816eb951427fc4409843cc8.tar.gz
rails-448e7e7c04260c34b816eb951427fc4409843cc8.tar.bz2
rails-448e7e7c04260c34b816eb951427fc4409843cc8.zip
Let fresh_when actually do the head(:not_modified). Cleaner and we get the filter halting for free then.
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r--actionpack/test/controller/render_test.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/actionpack/test/controller/render_test.rb b/actionpack/test/controller/render_test.rb
index 98d4cb3ffe..35d9b19cc0 100644
--- a/actionpack/test/controller/render_test.rb
+++ b/actionpack/test/controller/render_test.rb
@@ -41,9 +41,7 @@ class TestController < ActionController::Base
before_filter :handle_last_modified_and_etags, :only=>:conditional_hello_with_bangs
def handle_last_modified_and_etags
- if fresh?(:last_modified => Time.now.utc.beginning_of_day, :etag => [ :foo, 123 ])
- head :not_modified
- end
+ fresh_when(:last_modified => Time.now.utc.beginning_of_day, :etag => [ :foo, 123 ])
end
def render_hello_world