diff options
author | José Valim <jose.valim@gmail.com> | 2011-11-30 09:52:52 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-11-30 09:53:09 +0100 |
commit | 38ab982cfff98570b5f12933cff489364845789c (patch) | |
tree | 20c563f1e1447234a1dfdb2e385c1ae06bd328ed /actionpack/test/controller | |
parent | a6ee246e5cea1c1a71631c6bef3740a4bf4eb250 (diff) | |
download | rails-38ab982cfff98570b5f12933cff489364845789c.tar.gz rails-38ab982cfff98570b5f12933cff489364845789c.tar.bz2 rails-38ab982cfff98570b5f12933cff489364845789c.zip |
Log 'Filter chain halted as CALLBACKNAME rendered or redirected' every time a before callback halts.
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r-- | actionpack/test/controller/log_subscriber_test.rb | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/actionpack/test/controller/log_subscriber_test.rb b/actionpack/test/controller/log_subscriber_test.rb index ccdfcb0b2c..700fd788fa 100644 --- a/actionpack/test/controller/log_subscriber_test.rb +++ b/actionpack/test/controller/log_subscriber_test.rb @@ -13,6 +13,11 @@ module Another head :status => 406 end + before_filter :redirector, :only => :never_executed + + def never_executed + end + def show render :nothing => true end @@ -49,7 +54,6 @@ module Another def with_rescued_exception raise SpecialException end - end end @@ -86,6 +90,13 @@ class ACLogSubscriberTest < ActionController::TestCase assert_equal "Processing by Another::LogSubscribersController#show as HTML", logs.first end + def test_halted_callback + get :never_executed + wait + assert_equal 4, logs.size + assert_equal "Filter chain halted as :redirector rendered or redirected", logs.third + end + def test_process_action get :show wait |