Skip to content
Snippets Groups Projects
Commit 31927a87 authored by Ryan Boland's avatar Ryan Boland
Browse files

update geocodio test result

parent 55cea457
No related branches found
No related tags found
No related merge requests found
......@@ -40,7 +40,7 @@ module Geocoder::Result
end
def country_code
address_components['country'] || "US"
address_components['country']
end
def city
......
{"input":{"address_components":{"number":"1101","street":"Pennsylvania","suffix":"Ave","postdirectional":"NW","formatted_street":"Pennsylvania Ave NW","city":"Washington","state":"DC"},"formatted_address":"1101 Pennsylvania Ave NW, Washington, DC"},"results":[{"address_components":{"number":"1101","street":"Pennsylvania","suffix":"Ave","postdirectional":"NW","formatted_street":"Pennsylvania Ave NW","city":"Washington","county":"District of Columbia","state":"DC","zip":"20004"},"formatted_address":"1101 Pennsylvania Ave NW, Washington, DC 20004","location":{"lat":38.895019,"lng":-77.028095},"accuracy":1,"accuracy_type":"range_interpolation"},{"address_components":{"number":"1101","street":"Pennsylvania","suffix":"Ave","postdirectional":"NW","formatted_street":"Pennsylvania Ave NW","city":"Washington","county":"District of Columbia","state":"DC","zip":"20004"},"formatted_address":"1101 Pennsylvania Ave NW, Washington, DC 20004","location":{"lat":38.895016122449,"lng":-77.028084377551},"accuracy":0.8,"accuracy_type":"range_interpolation"}]}
\ No newline at end of file
{"input":{"address_components":{"number":"1101","street":"Pennsylvania","suffix":"Ave","postdirectional":"NW","formatted_street":"Pennsylvania Ave NW","city":"Washington","state":"DC","zip":"20001","country":"US"},"formatted_address":"1101 Pennsylvania Ave NW, Washington, DC 20001"},"results":[{"address_components":{"number":"1101","street":"Pennsylvania","suffix":"Ave","postdirectional":"NW","formatted_street":"Pennsylvania Ave NW","city":"Washington","county":"District of Columbia","state":"DC","zip":"20004","country":"US"},"formatted_address":"1101 Pennsylvania Ave NW, Washington, DC 20004","location":{"lat":38.895156,"lng":-77.027405},"accuracy":1,"accuracy_type":"rooftop","source":"DC Geographic Information Systems Program (DC GIS)"}]}
......@@ -21,7 +21,7 @@ class GeocodioTest < GeocoderTestCase
assert_equal "US", result.country_code
assert_equal "United States", result.country
assert_equal "1101 Pennsylvania Ave NW, Washington, DC 20004", result.formatted_address
assert_equal({ "lat" => 38.895019, "lng" => -77.028095 }, result.location)
assert_equal({ "lat" => 38.895156, "lng" => -77.027405 }, result.location)
end
def test_reverse_canada_result
......
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