Browse files

Merge pull request #499 from barttenbrinke/master

Added specific test when X-Forwarded-For is 'unknown'
  • Loading branch information...
2 parents 0cba6a4 + 0c14599 commit e1a4c0094501fed6a0a893667a5e3e221a37bde2 @rkh rkh committed Jan 22, 2013
Showing with 5 additions and 0 deletions.
  1. +5 −0 test/spec_request.rb
View
5 test/spec_request.rb
@@ -933,6 +933,11 @@
res.body.should.equal '1.2.3.4'
res = mock.get '/',
+ 'REMOTE_ADDR' => '1.2.3.4',
+ 'HTTP_X_FORWARDED_FOR' => 'unknown'
+ res.body.should.equal '1.2.3.4'
+
+ res = mock.get '/',
'REMOTE_ADDR' => '127.0.0.1',
'HTTP_X_FORWARDED_FOR' => '3.4.5.6'
res.body.should.equal '3.4.5.6'

0 comments on commit e1a4c00

Please sign in to comment.