Skip to content
Snippets Groups Projects
Commit 9db067d3 authored by Brian Ewell's avatar Brian Ewell
Browse files

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

parent d701e04e
No related branches found
No related tags found
No related merge requests found
......@@ -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% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment