Adding tests

This commit is contained in:
Carla Iriberri 2015-11-12 11:35:12 +01:00
parent 7ba807d4a7
commit 3f6df14fc7

View File

@ -1,6 +1,11 @@
-- Check that the public function is callable, even with no data -- Check that the public function is callable, even with no data
-- It should return NULL -- It should return NULL
SELECT cdb_geocoder_server.geocode_namedplace(session_user, txid_current(), 'Elx'); SELECT cdb_geocoder_server.geocode_namedplace(session_user, txid_current(), 'Elx');
SELECT cdb_geocoder_server.geocode_namedplace(session_user, txid_current(), 'Elche');
SELECT cdb_geocoder_server.geocode_namedplace(session_user, txid_current(), 'Elx', 'Spain');
SELECT cdb_geocoder_server.geocode_namedplace(session_user, txid_current(), 'Elche', 'Spain');
SELECT cdb_geocoder_server.geocode_namedplace(session_user, txid_current(), 'Elx', 'Valencia', 'Spain');
SELECT cdb_geocoder_server.geocode_namedplace(session_user, txid_current(), 'Elche', 'valencia', 'Spain');
-- Insert dummy data into points table -- Insert dummy data into points table
INSERT INTO global_cities_points_limited (geoname_id, name, iso2, admin1, admin2, population, lowername, the_geom) VALUES (3128760, 'Elche', 'ES', 'Valencia', 'AL', 34534, 'elche', ST_GeomFromText( INSERT INTO global_cities_points_limited (geoname_id, name, iso2, admin1, admin2, population, lowername, the_geom) VALUES (3128760, 'Elche', 'ES', 'Valencia', 'AL', 34534, 'elche', ST_GeomFromText(