From eacaf3489e9fbc6e4db34ea87ef0a2012521de28 Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Mon, 2 Oct 2017 23:09:45 +0200 Subject: [PATCH] more coverage tests for Geocode.php --- test/bdd/api/search/postcode.feature | 7 +++++++ test/bdd/api/search/queries.feature | 18 ++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/test/bdd/api/search/postcode.feature b/test/bdd/api/search/postcode.feature index f92aff3c..6033f7cc 100644 --- a/test/bdd/api/search/postcode.feature +++ b/test/bdd/api/search/postcode.feature @@ -18,3 +18,10 @@ Feature: Searches with postcodes | country_code | | li | + Scenario: Postcode search with country code restriction + When sending json search query "9490" with address + | countrycodes | + | li | + Then result addresses contain + | country_code | + | li | diff --git a/test/bdd/api/search/queries.feature b/test/bdd/api/search/queries.feature index 49e1d9c0..2767f87c 100644 --- a/test/bdd/api/search/queries.feature +++ b/test/bdd/api/search/queries.feature @@ -96,6 +96,24 @@ Feature: Search queries | class | type | | man_made | mast | + Scenario: Arbitrary key/value search near a road + When sending json search query "[leisure=table_soccer_table] immenbusch" + Then results contain + | class | type | + | leisure | table_soccer_table | + + Scenario: Ignore other country codes in structured search with country + When sending json search query "" + | city | country | + | li | de | + Then exactly 0 results are returned + + Scenario: Ignore country searches when query is restricted to countries + When sending json search query "de" + | countrycodes | + | li | + Then exactly 0 results are returned + # https://trac.openstreetmap.org/ticket/5094 Scenario: housenumbers are ordered by complete match first When sending json search query "6395 geminis, montevideo" with address -- 2.39.5