diff options
author | Andrew White <pixeltrix@users.noreply.github.com> | 2014-10-27 22:46:19 +0000 |
---|---|---|
committer | Andrew White <pixeltrix@users.noreply.github.com> | 2014-10-27 22:46:19 +0000 |
commit | df0ea90cf14057c6d0ff803cdb22d8147b14ecc4 (patch) | |
tree | 076ad8140e3d8e3bd57fd41a5b8e50ad21168c6e /railties | |
parent | 5d6fca0c04bab69dabe881e3e6741eff30c13c31 (diff) | |
parent | 8e1362be3fa8afa352a7acc4a1561205bcdada1e (diff) | |
download | rails-df0ea90cf14057c6d0ff803cdb22d8147b14ecc4.tar.gz rails-df0ea90cf14057c6d0ff803cdb22d8147b14ecc4.tar.bz2 rails-df0ea90cf14057c6d0ff803cdb22d8147b14ecc4.zip |
Merge pull request #16229 from byroot/stop-swallowing-url-generation-errors
UrlGenerationError are not catched as 404 anymore
Diffstat (limited to 'railties')
-rw-r--r-- | railties/test/application/middleware/exceptions_test.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/railties/test/application/middleware/exceptions_test.rb b/railties/test/application/middleware/exceptions_test.rb index 42096cfec4..a7472b37f1 100644 --- a/railties/test/application/middleware/exceptions_test.rb +++ b/railties/test/application/middleware/exceptions_test.rb @@ -60,6 +60,21 @@ module ApplicationTests assert_equal "YOU FAILED BRO", last_response.body end + test "url generation error when action_dispatch.show_exceptions is set raises an exception" do + controller :foo, <<-RUBY + class FooController < ActionController::Base + def index + raise ActionController::UrlGenerationError + end + end + RUBY + + app.config.action_dispatch.show_exceptions = true + + get '/foo' + assert_equal 500, last_response.status + end + test "unspecified route when action_dispatch.show_exceptions is not set raises an exception" do app.config.action_dispatch.show_exceptions = false |