aboutsummaryrefslogtreecommitdiffstats
path: root/spec/integration/ip_spoofing_spec.rb
diff options
context:
space:
mode:
authorGareth Rees <gareth@mysociety.org>2014-04-14 17:11:37 +0100
committerGareth Rees <gareth@mysociety.org>2014-04-14 17:11:37 +0100
commit4e74160d372fd4bca170c056944708b7cfdd2dba (patch)
treebb5883e1daf7be47e717db3a88802fe4bf3876eb /spec/integration/ip_spoofing_spec.rb
parenteeddc8f46a9583782ee8185de395499d99a5d12a (diff)
parent8d3b3044fb4a606b76a03abbb71064bcb4875704 (diff)
Merge branch 'issues/1343-ip-spoofing-error' into rails-3-develop
Diffstat (limited to 'spec/integration/ip_spoofing_spec.rb')
-rw-r--r--spec/integration/ip_spoofing_spec.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/integration/ip_spoofing_spec.rb b/spec/integration/ip_spoofing_spec.rb
new file mode 100644
index 000000000..073f71ad6
--- /dev/null
+++ b/spec/integration/ip_spoofing_spec.rb
@@ -0,0 +1,11 @@
+require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
+
+describe 'when getting a country message' do
+
+ it 'should not raise an IP spoofing error when given mismatched headers' do
+ get '/country_message', nil, { 'HTTP_X_FORWARDED_FOR' => '1.2.3.4',
+ 'HTTP_CLIENT_IP' => '5.5.5.5' }
+ response.status.should == 200
+ end
+
+end