]> git.openstreetmap.org Git - nominatim.git/blobdiff - test/bdd/osm2pgsql/update/simple.feature
Merge remote-tracking branch 'upstream/master'
[nominatim.git] / test / bdd / osm2pgsql / update / simple.feature
index 33c21039e1425a5a4dc4487407de86a643d2720e..072f83fa4e98d4c86a939fa9bfb937cb3b231ebf 100644 (file)
@@ -9,10 +9,10 @@ Feature: Update of simple objects by osm2pgsql
           n2 Tplace=locality,name=spotty
           """
         Then place contains
           n2 Tplace=locality,name=spotty
           """
         Then place contains
-          | object     | type       | name
-          | N1:tourism | hotel      | 'name' : 'foo'
-          | N1:amenity | restaurant | 'name' : 'foo'
-          | N2:place   | locality   | 'name' : 'spotty'
+          | object     | type       | name+name |
+          | N1:tourism | hotel      | foo |
+          | N1:amenity | restaurant | foo |
+          | N2:place   | locality   | spotty |
         When updating osm data
           """
           n1 dV Ttourism=hotel,name=foo
         When updating osm data
           """
           n1 dV Ttourism=hotel,name=foo
@@ -21,6 +21,41 @@ Feature: Update of simple objects by osm2pgsql
         Then place has no entry for N1:amenity
         And place has no entry for N2
         And place contains
         Then place has no entry for N1:amenity
         And place has no entry for N2
         And place contains
-          | object     | class   | type       | name
-          | N1:tourism | tourism | hotel      | 'name' : 'foo'
+          | object     | class   | type       | name |
+          | N1:tourism | tourism | hotel      | 'name' : 'foo' |
 
 
+    Scenario: Downgrading a highway to one that is dropped without name
+        When loading osm data
+          """
+          n100 x0 y0
+          n101 x0.0001 y0.0001
+          w1 Thighway=residential Nn100,n101
+          """
+        Then place contains
+          | object     |
+          | W1:highway |
+        When updating osm data
+          """
+          w1 Thighway=service Nn100,n101
+          """
+        Then place has no entry for W1
+
+    Scenario: Downgrading a highway when a second tag is present
+        When loading osm data
+          """
+          n100 x0 y0
+          n101 x0.0001 y0.0001
+          w1 Thighway=residential,tourism=hotel Nn100,n101
+          """
+        Then place contains
+          | object     |
+          | W1:highway |
+          | W1:tourism |
+        When updating osm data
+          """
+          w1 Thighway=service,tourism=hotel Nn100,n101
+          """
+        Then place has no entry for W1:highway
+        And place contains
+          | object     |
+          | W1:tourism |