diff options
author | Prem Sichanugrist <s@sikachu.com> | 2010-01-16 20:51:42 +0700 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-01-17 16:56:54 +0100 |
commit | eb67532bc1c1ce5c494b71b980c04c8aa83efb74 (patch) | |
tree | 1098a72023ae0b0919b8894ed34dd8222da0a469 /actionpack/test | |
parent | a0dc6cc70b694349a592b42ec3b58001ce82fec9 (diff) | |
download | rails-eb67532bc1c1ce5c494b71b980c04c8aa83efb74.tar.gz rails-eb67532bc1c1ce5c494b71b980c04c8aa83efb74.tar.bz2 rails-eb67532bc1c1ce5c494b71b980c04c8aa83efb74.zip |
Make local_request? to returns true when facing ::1 IPv6 address [#3257 status:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/dispatch/show_exceptions_test.rb | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/actionpack/test/dispatch/show_exceptions_test.rb b/actionpack/test/dispatch/show_exceptions_test.rb index 9f6a93756c..def86c8323 100644 --- a/actionpack/test/dispatch/show_exceptions_test.rb +++ b/actionpack/test/dispatch/show_exceptions_test.rb @@ -53,19 +53,21 @@ class ShowExceptionsTest < ActionController::IntegrationTest test "rescue locally from a local request" do @app = ProductionApp - self.remote_addr = '127.0.0.1' + ['127.0.0.1', '::1'].each do |ip_address| + self.remote_addr = ip_address - get "/" - assert_response 500 - assert_match /puke/, body + get "/" + assert_response 500 + assert_match /puke/, body - get "/not_found" - assert_response 404 - assert_match /#{ActionController::UnknownAction.name}/, body + get "/not_found" + assert_response 404 + assert_match /#{ActionController::UnknownAction.name}/, body - get "/method_not_allowed" - assert_response 405 - assert_match /ActionController::MethodNotAllowed/, body + get "/method_not_allowed" + assert_response 405 + assert_match /ActionController::MethodNotAllowed/, body + end end test "localize public rescue message" do |