]> git.openstreetmap.org Git - nominatim.git/commitdiff
add tests for new polygon_threshold feature
authorSarah Hoffmann <lonvia@denofr.de>
Thu, 30 Apr 2015 19:39:41 +0000 (21:39 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Thu, 30 Apr 2015 19:39:41 +0000 (21:39 +0200)
tests/features/api/search_params.feature

index 23a6bf5938eb46690efdbd5de2ab2dd73f56d828..1062cd0277c3702a015e3a8bc64fe4f532f6dcc1 100644 (file)
@@ -170,3 +170,35 @@ Feature: Search queries
         Then results contain
           | ID | display_name
           | 0  | Everest.*
+
+    Scenario Outline: Search with polygon threshold (json)
+        Given the request parameters
+          | polygon_geojson | polygon_threshold
+          | 1               | <th>
+        When sending json search query "switzerland"
+        Then at least 1 result is returned
+        And result 0 has attributes geojson
+
+     Examples:
+        | th
+        | -1
+        | 0.0
+        | 0.5
+        | 999
+        | nan
+
+    Scenario Outline: Search with polygon threshold (xml)
+        Given the request parameters
+          | polygon_geojson | polygon_threshold
+          | 1               | <th>
+        When sending xml search query "switzerland"
+        Then at least 1 result is returned
+        And result 0 has attributes geojson
+
+     Examples:
+        | th
+        | -1
+        | 0.0
+        | 0.5
+        | 999
+        | nan