mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
change tests to expect X-F-F over REMOTE_ADDR
This commit is contained in:
parent
e0efe48c45
commit
8f0085a483
1 changed files with 2 additions and 2 deletions
|
@ -36,7 +36,7 @@ class RequestTest < ActiveSupport::TestCase
|
|||
|
||||
request = stub_request 'REMOTE_ADDR' => '1.2.3.4',
|
||||
'HTTP_X_FORWARDED_FOR' => '3.4.5.6'
|
||||
assert_equal '1.2.3.4', request.remote_ip
|
||||
assert_equal '3.4.5.6', request.remote_ip
|
||||
|
||||
request = stub_request 'REMOTE_ADDR' => '127.0.0.1',
|
||||
'HTTP_X_FORWARDED_FOR' => '3.4.5.6'
|
||||
|
@ -106,7 +106,7 @@ class RequestTest < ActiveSupport::TestCase
|
|||
|
||||
request = stub_request 'REMOTE_ADDR' => '67.205.106.74,172.16.0.1',
|
||||
'HTTP_X_FORWARDED_FOR' => '3.4.5.6'
|
||||
assert_equal '67.205.106.74', request.remote_ip
|
||||
assert_equal '3.4.5.6', request.remote_ip
|
||||
|
||||
request = stub_request 'HTTP_X_FORWARDED_FOR' => 'unknown,67.205.106.73'
|
||||
assert_equal 'unknown', request.remote_ip
|
||||
|
|
Loading…
Reference in a new issue