From 9db067d3cff9cdf0bc93e43f4a6348577653a4e8 Mon Sep 17 00:00:00 2001 From: Brian Ewell <brian@brianewell.com> Date: Fri, 23 Mar 2012 11:23:43 -0700 Subject: [PATCH] Added tests for testing ::ffff: prefix to ipv4 addresses --- test/input_handling_test.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/input_handling_test.rb b/test/input_handling_test.rb index 9d453b97..f5da1f13 100644 --- a/test/input_handling_test.rb +++ b/test/input_handling_test.rb @@ -6,8 +6,10 @@ class InputHandlingTest < Test::Unit::TestCase def test_ip_address_detection assert Geocoder.send(:ip_address?, "232.65.123.94") assert Geocoder.send(:ip_address?, "666.65.123.94") # technically invalid + assert Geocoder.send(:ip_address?, "::ffff:12.34.56.78") assert !Geocoder.send(:ip_address?, "232.65.123.94.43") assert !Geocoder.send(:ip_address?, "232.65.123") + assert !Geocoder.send(:ip_address?, "::ffff:123.456.789") end def test_blank_query_detection -- GitLab