X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/98cb868ec119fca6eeec9145afe79bb9a621b4a4..7486bd8c0db3f34f69125a26a1fd5d4ab36dc25a:/tests/features/api/reverse_simple.feature diff --git a/tests/features/api/reverse_simple.feature b/tests/features/api/reverse_simple.feature index 7d564dde..6100f54c 100644 --- a/tests/features/api/reverse_simple.feature +++ b/tests/features/api/reverse_simple.feature @@ -17,6 +17,49 @@ Feature: Simple Reverse Tests | -79.34 | 23.5 | 0.23 | -178.555 + Scenario Outline: Testing different parameters + Given the request parameters + | + | + When sending search query "Manchester" + Then the result is valid html + Given the request parameters + | + | + When sending html search query "Manchester" + Then the result is valid html + Given the request parameters + | + | + When sending xml search query "Manchester" + Then the result is valid xml + Given the request parameters + | + | + When sending json search query "Manchester" + Then the result is valid json + Given the request parameters + | + | + When sending jsonv2 search query "Manchester" + Then the result is valid json + + Examples: + | parameter | value + | polygon | 1 + | polygon | 0 + | polygon_text | 1 + | polygon_text | 0 + | polygon_kml | 1 + | polygon_kml | 0 + | polygon_geojson | 1 + | polygon_geojson | 0 + | polygon_svg | 1 + | polygon_svg | 0 + + + + Scenario Outline: Wrapping of legal jsonp requests Given the request parameters | json_callback @@ -56,35 +99,35 @@ Feature: Simple Reverse Tests | lat | 51.51 When sending an API call reverse - Then exactly 0 results are returned + Then a HTTP 400 is returned Scenario: Missing lat parameter Given the request parameters | lon | -79.39114 When sending an API call reverse - Then exactly 0 results are returned + Then a HTTP 400 is returned Scenario: Missing osm_id parameter Given the request parameters | osm_type | N When sending an API call reverse - Then exactly 0 results are returned + Then a HTTP 400 is returned Scenario: Missing osm_type parameter Given the request parameters | osm_id | 3498564 When sending an API call reverse - Then exactly 0 results are returned + Then a HTTP 400 is returned Scenario Outline: Bad format for lat or lon Given the request parameters | lat | lon | | | | When sending an API call reverse - Then exactly 0 results are returned + Then a HTTP 400 is returned Examples: | lat | lon