mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-16 15:47:58 +00:00
fix syntax errors and update tests
Some of the tests with bad parameters now return a HTTP 400.
This commit is contained in:
@@ -99,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 |
|
||||
| <lat> | <lon> |
|
||||
When sending an API call reverse
|
||||
Then exactly 0 results are returned
|
||||
Then a HTTP 400 is returned
|
||||
|
||||
Examples:
|
||||
| lat | lon
|
||||
@@ -137,4 +137,4 @@ Feature: Simple Reverse Tests
|
||||
| 48.966.0 | 8.4482
|
||||
| 48.966 | 8.448.2
|
||||
| Nan | 8.448
|
||||
| 48.966 | Nan
|
||||
| 48.966 | Nan
|
||||
|
||||
@@ -187,7 +187,6 @@ Feature: Search queries
|
||||
| 0.0
|
||||
| 0.5
|
||||
| 999
|
||||
| nan
|
||||
|
||||
Scenario Outline: Search with polygon threshold (xml)
|
||||
Given the request parameters
|
||||
@@ -203,7 +202,14 @@ Feature: Search queries
|
||||
| 0.0
|
||||
| 0.5
|
||||
| 999
|
||||
| nan
|
||||
|
||||
Scenario Outline: Search with invalid polygon threshold (xml)
|
||||
Given the request parameters
|
||||
| polygon_geojson | polygon_threshold
|
||||
| 1 | <th>
|
||||
When sending xml search query "switzerland"
|
||||
Then a HTTP 400 is returned
|
||||
|
||||
|
||||
Scenario Outline: Search with extratags
|
||||
Given the request parameters
|
||||
|
||||
@@ -61,7 +61,7 @@ Feature: Simple Tests
|
||||
| format
|
||||
| fd$#
|
||||
When sending search query "Berlin"
|
||||
Then the result is valid html
|
||||
Then a HTTP 400 is returned
|
||||
|
||||
Scenario Outline: Simple Searches
|
||||
When sending search query "<query>"
|
||||
|
||||
Reference in New Issue
Block a user