First tests for postal codes
This commit is contained in:
36
geocoder/postal-codes/test/functions/test.sh
Normal file
36
geocoder/postal-codes/test/functions/test.sh
Normal file
@@ -0,0 +1,36 @@
|
||||
#!/bin/sh
|
||||
|
||||
|
||||
#################################################### TESTS GO HERE ####################################################
|
||||
|
||||
function test_geocoding_functions_zipcodes_usa() {
|
||||
#Checks that zipcode polygons are available
|
||||
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
|
||||
|
||||
}
|
||||
|
||||
function test_geocoding_functions_zipcodes_fra() {
|
||||
#Checks that zipcode polygons are available
|
||||
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
|
||||
}
|
||||
|
||||
function test_geocoding_functions_zipcodes_can() {
|
||||
#Checks that zipcode polygons are available
|
||||
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
|
||||
}
|
||||
|
||||
function test_geocoding_functions_zipcodes_aus() {
|
||||
#Checks that zipcode polygons are available
|
||||
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
|
||||
|
||||
}
|
||||
|
||||
#################################################### TESTS END HERE ####################################################
|
||||
Reference in New Issue
Block a user