From 448e7e7c04260c34b816eb951427fc4409843cc8 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Tue, 21 Oct 2008 02:54:55 +0200 Subject: Let fresh_when actually do the head(:not_modified). Cleaner and we get the filter halting for free then. --- actionpack/test/controller/render_test.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'actionpack/test/controller') 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 -- cgit v1.2.3