From 4eace918d3493048f8536e848de60013ba7c7948 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Tue, 26 Apr 2016 12:49:36 +0200 Subject: [PATCH] Improved code layout. --- test/integration/geo_calendar_test.rb | 22 +++++++++++----------- test/integration/geo_ip_test.rb | 14 +++++++------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/test/integration/geo_calendar_test.rb b/test/integration/geo_calendar_test.rb index 4ad930716..9cbbe836e 100644 --- a/test/integration/geo_calendar_test.rb +++ b/test/integration/geo_calendar_test.rb @@ -6,67 +6,67 @@ class GeoIpCalendar < ActiveSupport::TestCase # check test 'check some results' do - result = Service::GeoCalendar.location( '127.0.0.0.1' ) + result = Service::GeoCalendar.location('127.0.0.0.1') assert(result) assert_equal('My Calendar', result['name']) assert_equal('America/Los_Angeles', result['timezone']) assert_equal('', result['ical_url']) - result = Service::GeoCalendar.location( '127.0.0.1' ) + result = Service::GeoCalendar.location('127.0.0.1') assert(result) assert_equal('My Calendar', result['name']) assert_equal('America/Los_Angeles', result['timezone']) assert_equal('', result['ical_url']) - result = Service::GeoCalendar.location( '195.65.29.254' ) + result = Service::GeoCalendar.location('195.65.29.254') assert(result) assert_equal('Switzerland', result['name']) assert_equal('Europe/Zurich', result['timezone']) assert_equal('http://www.google.com/calendar/ical/de.ch%23holiday%40group.v.calendar.google.com/public/basic.ics', result['ical_url']) - result = Service::GeoCalendar.location( '195.191.132.18' ) + result = Service::GeoCalendar.location('195.191.132.18') assert(result) assert_equal('Switzerland', result['name']) assert_equal('Europe/Zurich', result['timezone']) assert_equal('http://www.google.com/calendar/ical/de.ch%23holiday%40group.v.calendar.google.com/public/basic.ics', result['ical_url']) - result = Service::GeoCalendar.location( '134.109.140.74' ) + result = Service::GeoCalendar.location('134.109.140.74') assert(result) assert_equal('Germany', result['name']) assert_equal('Europe/Berlin', result['timezone']) assert_equal('http://www.google.com/calendar/ical/de.german%23holiday%40group.v.calendar.google.com/public/basic.ics', result['ical_url']) - result = Service::GeoCalendar.location( '46.253.55.170' ) + result = Service::GeoCalendar.location('46.253.55.170') assert(result) assert_equal('Germany', result['name']) assert_equal('Europe/Berlin', result['timezone']) assert_equal('http://www.google.com/calendar/ical/de.german%23holiday%40group.v.calendar.google.com/public/basic.ics', result['ical_url']) - result = Service::GeoCalendar.location( '169.229.216.200' ) + result = Service::GeoCalendar.location('169.229.216.200') assert(result) assert_equal('United States/California', result['name']) assert_equal('America/Los_Angeles', result['timezone']) 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( '17.171.2.25' ) + result = Service::GeoCalendar.location('17.171.2.25') assert(result) assert_equal('United States/California', result['name']) assert_equal('America/Los_Angeles', result['timezone']) 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_equal('United States/Arizona', result['name']) assert_equal('America/Phoenix', result['timezone']) 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_equal('United States/New York', result['name']) assert_equal('America/New_York', result['timezone']) 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( '132.247.70.37' ) + result = Service::GeoCalendar.location('132.247.70.37') assert(result) assert_equal('Mexico/Sonora', result['name']) assert_equal('America/Hermosillo', result['timezone']) diff --git a/test/integration/geo_ip_test.rb b/test/integration/geo_ip_test.rb index b38b73fa4..b1eaba5e8 100644 --- a/test/integration/geo_ip_test.rb +++ b/test/integration/geo_ip_test.rb @@ -6,7 +6,7 @@ class GeoIpTest < ActiveSupport::TestCase # check test 'check some results' do - result = Service::GeoIp.location( '127.0.0.0.1' ) + result = Service::GeoIp.location('127.0.0.0.1') assert(result) assert_equal(nil, result['country_name']) assert_equal(nil, result['city_name']) @@ -15,7 +15,7 @@ class GeoIpTest < ActiveSupport::TestCase assert_equal(nil, result['latitude']) assert_equal(nil, result['longitude']) - result = Service::GeoIp.location( '127.0.0.1' ) + result = Service::GeoIp.location('127.0.0.1') assert(result) assert_equal(nil, result['country_name']) assert_equal(nil, result['city_name']) @@ -24,7 +24,7 @@ class GeoIpTest < ActiveSupport::TestCase assert_equal(nil, result['latitude']) assert_equal(nil, result['longitude']) - result = Service::GeoIp.location( '195.65.29.254' ) + result = Service::GeoIp.location('195.65.29.254') assert(result) assert_equal('Switzerland', result['country_name']) assert_equal('Regensdorf', result['city_name']) @@ -33,7 +33,7 @@ class GeoIpTest < ActiveSupport::TestCase assert_equal(47.4319, result['latitude']) assert_equal(8.4658, result['longitude']) - result = Service::GeoIp.location( '134.109.140.74' ) + result = Service::GeoIp.location('134.109.140.74') assert(result) assert_equal('Germany', result['country_name']) assert_equal('Chemnitz', result['city_name']) @@ -42,7 +42,7 @@ class GeoIpTest < ActiveSupport::TestCase assert_equal(50.8333, result['latitude']) assert_equal(12.9167, result['longitude']) - result = Service::GeoIp.location( '46.253.55.170' ) + result = Service::GeoIp.location('46.253.55.170') assert(result) assert_equal('Germany', result['country_name']) assert_equal('Halle', result['city_name']) @@ -51,7 +51,7 @@ class GeoIpTest < ActiveSupport::TestCase assert_equal(51.5034, result['latitude']) assert_equal(11.9622, result['longitude']) - result = Service::GeoIp.location( '169.229.216.200' ) + result = Service::GeoIp.location('169.229.216.200') assert(result) assert_equal('United States', result['country_name']) assert_equal('Berkeley', result['city_name']) @@ -60,7 +60,7 @@ class GeoIpTest < ActiveSupport::TestCase assert_equal(37.8668, result['latitude']) assert_equal(-122.2536, result['longitude']) - result = Service::GeoIp.location( '17.171.2.25' ) + result = Service::GeoIp.location('17.171.2.25') assert(result) assert_equal('United States', result['country_name']) assert_equal('Cupertino', result['city_name'])