Files
Nominatim/test/bdd/api/search/structured.feature
Sarah Hoffmann a0de20e9bc more API tests for code coverage
Also fixes two minor issues related to structured queries.
2017-09-17 23:30:08 +02:00

50 lines
1.5 KiB
Gherkin

@APIDB
Feature: Structured search queries
Testing correctness of results with
structured queries
Scenario: Country only
When sending json search query "" with address
| country |
| Liechtenstein |
Then address of result 0 is
| type | value |
| country | Liechtenstein |
| country_code | li |
Scenario: Postcode only
When sending json search query "" with address
| postalcode |
| 22547 |
Then results contain
| type |
| postcode |
And result addresses contain
| postcode |
| 22547 |
Scenario: Street, postcode and country
When sending xml search query "" with address
| street | postalcode | country |
| Old Palace Road | GU2 7UP | United Kingdom |
Then result header contains
| attr | value |
| querystring | Old Palace Road, GU2 7UP, United Kingdom |
Scenario: Amenity, city
When sending json search query "" with address
| city | amenity |
| Vaduz | church |
Then result addresses contain
| country |
| Liechtenstein |
And results contain
| class | type |
| amenity | place_of_worship |
Scenario: gihub #176
When sending json search query "" with address
| city |
| Mercedes |
Then at least 1 result is returned