aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndre Arko <andre@arko.net>2011-11-14 12:29:51 -1000
committerAndre Arko <andre@arko.net>2011-11-14 12:29:51 -1000
commitb8c85de62004868a34a27e58731f2a9e37aeebd0 (patch)
tree5cb60b3d463d711de2339882d6f438ef3dcd47ee
parent25c9e44a21511255fd4da4b584e4c8b4415476d8 (diff)
downloadrails-b8c85de62004868a34a27e58731f2a9e37aeebd0.tar.gz
rails-b8c85de62004868a34a27e58731f2a9e37aeebd0.tar.bz2
rails-b8c85de62004868a34a27e58731f2a9e37aeebd0.zip
add test for bug fixed in 4f2bf64
-rw-r--r--actionpack/test/dispatch/request_test.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/request_test.rb b/actionpack/test/dispatch/request_test.rb
index 4658eeea17..4d805464c2 100644
--- a/actionpack/test/dispatch/request_test.rb
+++ b/actionpack/test/dispatch/request_test.rb
@@ -89,6 +89,11 @@ class RequestTest < ActiveSupport::TestCase
assert_equal '9.9.9.9', request.remote_ip
end
+ test "remote ip when the remote ip middleware returns nil" do
+ request = stub_request 'REMOTE_ADDR' => '127.0.0.1'
+ assert_equal '127.0.0.1', request.remote_ip
+ end
+
test "remote ip with user specified trusted proxies" do
@trusted_proxies = /^67\.205\.106\.73$/i