diff options
author | Jon Leighton <j@jonathanleighton.com> | 2011-11-14 15:06:41 -0800 |
---|---|---|
committer | Jon Leighton <j@jonathanleighton.com> | 2011-11-14 15:06:41 -0800 |
commit | c7ab43ff062390205f1508b6476cd354a16eb362 (patch) | |
tree | 5cb60b3d463d711de2339882d6f438ef3dcd47ee | |
parent | 25c9e44a21511255fd4da4b584e4c8b4415476d8 (diff) | |
parent | b8c85de62004868a34a27e58731f2a9e37aeebd0 (diff) | |
download | rails-c7ab43ff062390205f1508b6476cd354a16eb362.tar.gz rails-c7ab43ff062390205f1508b6476cd354a16eb362.tar.bz2 rails-c7ab43ff062390205f1508b6476cd354a16eb362.zip |
Merge pull request #3632 from indirect/b8c85de
unit test for fix from a few minutes ago
-rw-r--r-- | actionpack/test/dispatch/request_test.rb | 5 |
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 |