Maintenance: Applied required updates for GeoIP service update.
This commit is contained in:
parent
b9b3a73474
commit
d146919a07
2 changed files with 18 additions and 28 deletions
|
@ -49,26 +49,26 @@ class GeoIpCalendar < ActiveSupport::TestCase
|
||||||
|
|
||||||
result = Service::GeoCalendar.location('17.171.2.25')
|
result = Service::GeoCalendar.location('17.171.2.25')
|
||||||
assert(result)
|
assert(result)
|
||||||
assert_equal('United States/California', result['name'])
|
assert_equal('United States', result['name'])
|
||||||
assert_equal('America/Los_Angeles', result['timezone'])
|
assert_equal('America/Chicago', result['timezone'])
|
||||||
assert_equal('http://www.google.com/calendar/ical/en.usa%23holiday%40group.v.calendar.google.com/public/basic.ics', result['ical_url'])
|
assert_equal('http://www.google.com/calendar/ical/en.usa%23holiday%40group.v.calendar.google.com/public/basic.ics', result['ical_url'])
|
||||||
|
|
||||||
result = Service::GeoCalendar.location('184.168.47.225')
|
result = Service::GeoCalendar.location('184.168.47.225')
|
||||||
assert(result)
|
assert(result)
|
||||||
assert_equal('United States/Arizona', result['name'])
|
assert_equal('United States', result['name'])
|
||||||
assert_equal('America/Phoenix', result['timezone'])
|
assert_equal('America/Chicago', result['timezone'])
|
||||||
assert_equal('http://www.google.com/calendar/ical/en.usa%23holiday%40group.v.calendar.google.com/public/basic.ics', result['ical_url'])
|
assert_equal('http://www.google.com/calendar/ical/en.usa%23holiday%40group.v.calendar.google.com/public/basic.ics', result['ical_url'])
|
||||||
|
|
||||||
result = Service::GeoCalendar.location('69.172.201.245')
|
result = Service::GeoCalendar.location('69.172.201.245')
|
||||||
assert(result)
|
assert(result)
|
||||||
assert_equal('United States/New York', result['name'])
|
assert_equal('Canada', result['name'])
|
||||||
assert_equal('America/New_York', result['timezone'])
|
assert_equal('America/Toronto', result['timezone'])
|
||||||
assert_equal('http://www.google.com/calendar/ical/en.usa%23holiday%40group.v.calendar.google.com/public/basic.ics', result['ical_url'])
|
assert_equal('http://www.google.com/calendar/ical/en.canadian%23holiday%40group.v.calendar.google.com/public/basic.ics', result['ical_url'])
|
||||||
|
|
||||||
result = Service::GeoCalendar.location('132.247.70.37')
|
result = Service::GeoCalendar.location('132.247.70.37')
|
||||||
assert(result)
|
assert(result)
|
||||||
assert_equal('Mexico/Sonora', result['name'])
|
assert_equal('Mexico/Mexico City', result['name'])
|
||||||
assert_equal('America/Hermosillo', result['timezone'])
|
assert_equal('America/Mexico_City', result['timezone'])
|
||||||
assert_equal('http://www.google.com/calendar/ical/en.mexican%23holiday%40group.v.calendar.google.com/public/basic.ics', result['ical_url'])
|
assert_equal('http://www.google.com/calendar/ical/en.mexican%23holiday%40group.v.calendar.google.com/public/basic.ics', result['ical_url'])
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -29,8 +29,8 @@ class GeoIpTest < ActiveSupport::TestCase
|
||||||
assert_equal('Regensdorf', result['city_name'])
|
assert_equal('Regensdorf', result['city_name'])
|
||||||
assert_equal('CH', result['country_code'])
|
assert_equal('CH', result['country_code'])
|
||||||
assert_equal('EU', result['continent_code'])
|
assert_equal('EU', result['continent_code'])
|
||||||
assert_equal(47.4319, result['latitude'])
|
assert_equal(47.4341, result['latitude'])
|
||||||
assert_equal(8.4658, result['longitude'])
|
assert_equal(8.4687, result['longitude'])
|
||||||
|
|
||||||
result = Service::GeoIp.location('134.109.140.74')
|
result = Service::GeoIp.location('134.109.140.74')
|
||||||
assert(result)
|
assert(result)
|
||||||
|
@ -38,8 +38,8 @@ class GeoIpTest < ActiveSupport::TestCase
|
||||||
assert_equal('Chemnitz', result['city_name'])
|
assert_equal('Chemnitz', result['city_name'])
|
||||||
assert_equal('DE', result['country_code'])
|
assert_equal('DE', result['country_code'])
|
||||||
assert_equal('EU', result['continent_code'])
|
assert_equal('EU', result['continent_code'])
|
||||||
assert_equal(50.8333, result['latitude'])
|
assert_equal(50.8197, result['latitude'])
|
||||||
assert_equal(12.9167, result['longitude'])
|
assert_equal(12.9403, result['longitude'])
|
||||||
|
|
||||||
result = Service::GeoIp.location('46.253.55.170')
|
result = Service::GeoIp.location('46.253.55.170')
|
||||||
assert(result)
|
assert(result)
|
||||||
|
@ -47,26 +47,16 @@ class GeoIpTest < ActiveSupport::TestCase
|
||||||
assert_equal('Halle', result['city_name'])
|
assert_equal('Halle', result['city_name'])
|
||||||
assert_equal('DE', result['country_code'])
|
assert_equal('DE', result['country_code'])
|
||||||
assert_equal('EU', result['continent_code'])
|
assert_equal('EU', result['continent_code'])
|
||||||
assert_equal(51.5034, result['latitude'])
|
assert_equal(51.5036, result['latitude'])
|
||||||
assert_equal(11.9622, result['longitude'])
|
assert_equal(11.9594, result['longitude'])
|
||||||
|
|
||||||
result = Service::GeoIp.location('169.229.216.200')
|
result = Service::GeoIp.location('169.229.216.200')
|
||||||
assert(result)
|
assert(result)
|
||||||
assert_equal('United States', result['country_name'])
|
assert_equal('United States', result['country_name'])
|
||||||
assert_equal('Berkeley', result['city_name'])
|
assert_equal('Alameda', result['city_name'])
|
||||||
assert_equal('US', result['country_code'])
|
assert_equal('US', result['country_code'])
|
||||||
assert_equal('NA', result['continent_code'])
|
assert_equal('NA', result['continent_code'])
|
||||||
assert_equal(37.8668, result['latitude'])
|
assert_equal(37.7688, result['latitude'])
|
||||||
assert_equal(-122.2536, result['longitude'])
|
assert_equal(-122.262, result['longitude'])
|
||||||
|
|
||||||
result = Service::GeoIp.location('17.171.2.25')
|
|
||||||
assert(result)
|
|
||||||
assert_equal('United States', result['country_name'])
|
|
||||||
assert_equal('Cupertino', result['city_name'])
|
|
||||||
assert_equal('US', result['country_code'])
|
|
||||||
assert_equal('NA', result['continent_code'])
|
|
||||||
assert_equal(37.323, result['latitude'])
|
|
||||||
assert_equal(-122.0322, result['longitude'])
|
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue