aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2017-04-26 20:54:12 -0700
committerGitHub <noreply@github.com>2017-04-26 20:54:12 -0700
commitc5663c428218fc6e1ed78fa6bbf85a88991e9bde (patch)
tree82f2ee98d000c3c0451d505521e5fde9df6a163d /railties
parent3090017c6310b2eca5de3770e4a84d0cfa0d781e (diff)
parente06f68fdb2132623d27a26ae58213b09ecb308ee (diff)
downloadrails-c5663c428218fc6e1ed78fa6bbf85a88991e9bde.tar.gz
rails-c5663c428218fc6e1ed78fa6bbf85a88991e9bde.tar.bz2
rails-c5663c428218fc6e1ed78fa6bbf85a88991e9bde.zip
Merge pull request #28897 from rafaelfranca/fix-name-error-error-page
Do not try to encoding the parameters when the controller is not defined
Diffstat (limited to 'railties')
-rw-r--r--railties/test/application/middleware/exceptions_test.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/railties/test/application/middleware/exceptions_test.rb b/railties/test/application/middleware/exceptions_test.rb
index cbb990f13b..fe07ad3cbe 100644
--- a/railties/test/application/middleware/exceptions_test.rb
+++ b/railties/test/application/middleware/exceptions_test.rb
@@ -100,6 +100,20 @@ module ApplicationTests
end
end
+ test "routing to an nonexistent controller when action_dispatch.show_exceptions and consider_all_requests_local are set shows diagnostics" do
+ app_file "config/routes.rb", <<-RUBY
+ Rails.application.routes.draw do
+ resources :articles
+ end
+ RUBY
+
+ app.config.action_dispatch.show_exceptions = true
+ app.config.consider_all_requests_local = true
+
+ get "/articles"
+ assert_match "<title>Action Controller: Exception caught</title>", last_response.body
+ end
+
test "displays diagnostics message when exception raised in template that contains UTF-8" do
controller :foo, <<-RUBY
class FooController < ActionController::Base