]> git.openstreetmap.org Git - nominatim.git/commitdiff
more coverage tests for Geocode.php
authorSarah Hoffmann <lonvia@denofr.de>
Mon, 2 Oct 2017 21:09:45 +0000 (23:09 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Mon, 2 Oct 2017 21:09:45 +0000 (23:09 +0200)
test/bdd/api/search/postcode.feature
test/bdd/api/search/queries.feature

index f92aff3cba2151090530e6495b62a635626ead1a..6033f7cca5978ca105960579d0bcfc3fbc852cb3 100644 (file)
@@ -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           |
index 49e1d9c052e575e2880add13d3309ddfe5167482..2767f87cfd40fc84bb74005983be0fbd066b6d2a 100644 (file)
@@ -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