Permalink
Browse files

Merge pull request #3632 from indirect/b8c85de

unit test for fix from a few minutes ago
  • Loading branch information...
2 parents 25c9e44 + b8c85de commit c7ab43ff062390205f1508b6476cd354a16eb362 @jonleighton jonleighton committed Nov 14, 2011
Showing with 5 additions and 0 deletions.
  1. +5 −0 actionpack/test/dispatch/request_test.rb
View
5 actionpack/test/dispatch/request_test.rb
@@ -89,6 +89,11 @@ def url_for(options = {})
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

0 comments on commit c7ab43f

Please sign in to comment.