Remove postcodes also from word table when they no longer exist

Also adds tests for postcode updates.

Fixes #1273.
This commit is contained in:
Sarah Hoffmann
2019-01-04 23:11:47 +01:00
parent 181e238b55
commit cc17aa8d6b
4 changed files with 117 additions and 0 deletions

View File

@@ -125,3 +125,15 @@ Feature: Import of postcodes
Then placex contains
| object | postcode |
| W93 | 112 DE 34 |
Scenario: Postcodes are added to the postcode and word table
Given the places
| osm | class | type | addr+postcode | addr+housenumber | geometry |
| N34 | place | house | 01982 | 111 |country:de |
When importing
Then location_postcode contains exactly
| country | postcode | geometry |
| de | 01982 | country:de |
And word contains
| word | class | type |
| 01982 | place | postcode |