diff options
author | Jean Boussier <jean.boussier@gmail.com> | 2014-07-19 10:32:48 -0400 |
---|---|---|
committer | Jean Boussier <jean.boussier@gmail.com> | 2014-10-27 16:53:10 -0400 |
commit | 8e1362be3fa8afa352a7acc4a1561205bcdada1e (patch) | |
tree | 3cff26579e7fdfcff8d1ddea9dc65b9d2bb0e13b /railties | |
parent | 89397d09ebb7ca4089f17820d05d5eb223913652 (diff) | |
download | rails-8e1362be3fa8afa352a7acc4a1561205bcdada1e.tar.gz rails-8e1362be3fa8afa352a7acc4a1561205bcdada1e.tar.bz2 rails-8e1362be3fa8afa352a7acc4a1561205bcdada1e.zip |
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 |