2 Feature: Update of postcode
3 Tests for updating of data related to postcodes
5 Scenario: A new postcode appears in the postcode and word table
7 | osm | class | type | addr+postcode | addr+housenumber | geometry |
8 | N34 | place | house | 01982 | 111 |country:de |
10 Then location_postcode contains exactly
11 | country | postcode | geometry |
12 | de | 01982 | country:de |
14 | osm | class | type | addr+postcode | addr+housenumber | geometry |
15 | N35 | place | house | 4567 | 5 |country:ch |
16 And updating postcodes
17 Then location_postcode contains exactly
18 | country | postcode | geometry |
19 | de | 01982 | country:de |
20 | ch | 4567 | country:ch |
22 | word | class | type |
23 | 01982 | place | postcode |
24 | 4567 | place | postcode |
26 Scenario: When the last postcode is deleted, it is deleted from postcode and word
28 | osm | class | type | addr+postcode | addr+housenumber | geometry |
29 | N34 | place | house | 01982 | 111 |country:de |
30 | N35 | place | house | 4567 | 5 |country:ch |
32 And marking for delete N34
33 And updating postcodes
34 Then location_postcode contains exactly
35 | country | postcode | geometry |
36 | ch | 4567 | country:ch |
38 | word | class | type |
39 | 01982 | place | postcode |
41 | word | class | type |
42 | 4567 | place | postcode |
44 Scenario: A postcode is not deleted from postcode and word when it exist in another country
46 | osm | class | type | addr+postcode | addr+housenumber | geometry |
47 | N34 | place | house | 01982 | 111 |country:de |
48 | N35 | place | house | 01982 | 5 |country:ch |
50 And marking for delete N34
51 And updating postcodes
52 Then location_postcode contains exactly
53 | country | postcode | geometry |
54 | ch | 01982 | country:ch |
56 | word | class | type |
57 | 01982 | place | postcode |
59 Scenario: Updating a postcode is reflected in postcode table
61 | osm | class | type | addr+postcode | geometry |
62 | N34 | place | postcode | 01982 | country:de |
65 | osm | class | type | addr+postcode | geometry |
66 | N34 | place | postcode | 20453 | country:de |
67 And updating postcodes
68 Then location_postcode contains exactly
69 | country | postcode | geometry |
70 | de | 20453 | country:de |
72 | word | class | type |
73 | 20453 | place | postcode |
75 Scenario: When changing from a postcode type, the entry appears in placex
78 | osm | class | type | addr+postcode | geometry |
79 | N34 | place | postcode | 01982 | country:de |
80 Then placex has no entry for N34
82 | osm | class | type | addr+postcode | housenr | geometry |
83 | N34 | place | house | 20453 | 1 | country:de |
85 | object | addr+housenumber | geometry |
86 | N34 | 1 | country:de|
87 And place contains exactly
88 | object | class | type |
89 | N34 | place | house |
90 When updating postcodes
91 Then location_postcode contains exactly
92 | country | postcode | geometry |
93 | de | 20453 | country:de |
95 | word | class | type |
96 | 20453 | place | postcode |
98 Scenario: When changing to a postcode type, the entry disappears from placex
101 | osm | class | type | addr+postcode | housenr | geometry |
102 | N34 | place | house | 20453 | 1 | country:de |
104 | object | addr+housenumber | geometry |
105 | N34 | 1 | country:de|
107 | osm | class | type | addr+postcode | geometry |
108 | N34 | place | postcode | 01982 | country:de |
109 Then placex has no entry for N34
110 And place contains exactly
111 | object | class | type |
112 | N34 | place | postcode |
113 When updating postcodes
114 Then location_postcode contains exactly
115 | country | postcode | geometry |
116 | de | 01982 | country:de |
118 | word | class | type |
119 | 01982 | place | postcode |