aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2011-12-03 11:38:25 +0100
committerJosé Valim <jose.valim@gmail.com>2011-12-03 11:38:25 +0100
commit2ab2077235308aaa82dc430f1da8d6519fb7dac0 (patch)
tree05ec14d70283ffd4b342b9ef155849666d50609a /actionpack/test
parent0e17cf17ebeb70490d7c7cd25c6bf8f9401e44b3 (diff)
downloadrails-2ab2077235308aaa82dc430f1da8d6519fb7dac0.tar.gz
rails-2ab2077235308aaa82dc430f1da8d6519fb7dac0.tar.bz2
rails-2ab2077235308aaa82dc430f1da8d6519fb7dac0.zip
Fix failing cascade exception.
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/dispatch/debug_exceptions_test.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/debug_exceptions_test.rb b/actionpack/test/dispatch/debug_exceptions_test.rb
index e6c0a06878..f7411c7729 100644
--- a/actionpack/test/dispatch/debug_exceptions_test.rb
+++ b/actionpack/test/dispatch/debug_exceptions_test.rb
@@ -11,6 +11,8 @@ class DebugExceptionsTest < ActionDispatch::IntegrationTest
env['action_dispatch.show_detailed_exceptions'] = @detailed
req = ActionDispatch::Request.new(env)
case req.path
+ when "/pass"
+ [404, { "X-Cascade" => "pass" }, []]
when "/not_found"
raise ActionController::UnknownAction
when "/runtime_error"
@@ -46,6 +48,13 @@ class DebugExceptionsTest < ActionDispatch::IntegrationTest
end
end
+ test 'raise an exception on cascade pass' do
+ @app = ProductionApp
+ assert_raise ActionController::RoutingError do
+ get "/pass", {}, {'action_dispatch.show_exceptions' => true}
+ end
+ end
+
test "rescue with diagnostics message" do
@app = DevelopmentApp