From fcc7f79b33b8d9fcf1942d2d55250f1321233511 Mon Sep 17 00:00:00 2001 From: Carla Date: Wed, 15 Jul 2015 17:13:30 +0200 Subject: [PATCH] Adds function tests for polygons --- geocoder/postal-codes/test/functions/test.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/geocoder/postal-codes/test/functions/test.sh b/geocoder/postal-codes/test/functions/test.sh index 591bce5..2fc3454 100644 --- a/geocoder/postal-codes/test/functions/test.sh +++ b/geocoder/postal-codes/test/functions/test.sh @@ -8,7 +8,7 @@ function test_geocoding_functions_zipcodes_usa() { sql "SELECT (admin0_available_services(Array['USA'])).postal_code_points" should true #Checks that zipcode points are available sql "SELECT (admin0_available_services(Array['USA'])).postal_code_polygons" should true - + sql "SELECT ST_GeometryType((geocode_postalcode_polygons(Array['11211'], 'USA')).geom)" should ST_MultiPolygon } function test_geocoding_functions_zipcodes_fra() { @@ -16,6 +16,8 @@ function test_geocoding_functions_zipcodes_fra() { sql "SELECT (admin0_available_services(Array['FRA'])).postal_code_points" should true #Checks that zipcode points are available sql "SELECT (admin0_available_services(Array['FRA'])).postal_code_polygons" should true + sql "SELECT ST_GeometryType(((geocode_postalcode_polygons(Array['23270'], Array['FRA'])).geom))" should ST_MultiPolygon + } function test_geocoding_functions_zipcodes_can() { @@ -23,6 +25,8 @@ function test_geocoding_functions_zipcodes_can() { sql "SELECT (admin0_available_services(Array['CAN'])).postal_code_points" should true #Checks that zipcode points are available sql "SELECT (admin0_available_services(Array['CAN'])).postal_code_polygons" should true + sql "SELECT ST_GeometryType((geocode_postalcode_polygons(Array['A0J'], 'CAN')).geom)" should ST_MultiPolygon + } function test_geocoding_functions_zipcodes_aus() { @@ -30,6 +34,8 @@ function test_geocoding_functions_zipcodes_aus() { sql "SELECT (admin0_available_services(Array['AUS'])).postal_code_points" should true #Checks that zipcode points are available sql "SELECT (admin0_available_services(Array['AUS'])).postal_code_polygons" should true + sql "SELECT ST_GeometryType((geocode_postalcode_polygons(Array['3012'], 'AUS')).geom)" should ST_MultiPolygon + }