Skip to content
Browse files

Added tests for testing ::ffff: prefix to ipv4 addresses

  • Loading branch information...
1 parent d701e04 commit 9db067d3cff9cdf0bc93e43f4a6348577653a4e8 @brian-ewell brian-ewell committed Mar 23, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 test/input_handling_test.rb
View
2 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

0 comments on commit 9db067d

Please sign in to comment.
Something went wrong with that request. Please try again.