+ | object | postcode |
+ | W93 | 11200 |
+
+ 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 there are word tokens for postcodes 01982
+
+
+ @Fail
+ Scenario: search and address ranks for GB post codes correctly assigned
+ Given the places
+ | osm | class | type | postcode | geometry |
+ | N1 | place | postcode | E45 2CD | country:gb |
+ | N2 | place | postcode | E45 2 | country:gb |
+ | N3 | place | postcode | Y45 | country:gb |
+ When importing
+ Then location_postcode contains exactly
+ | postcode | country | rank_search | rank_address |
+ | E45 2CD | gb | 25 | 5 |
+ | E45 2 | gb | 23 | 5 |
+ | Y45 | gb | 21 | 5 |
+
+ Scenario: Postcodes outside all countries are not added to the postcode and word table
+ Given the places
+ | osm | class | type | addr+postcode | addr+housenumber | addr+place | geometry |
+ | N34 | place | house | 01982 | 111 | Null Island | 0 0.00001 |
+ And the places
+ | osm | class | type | name | geometry |
+ | N1 | place | hamlet | Null Island | 0 0 |
+ When importing
+ Then location_postcode contains exactly
+ | country | postcode | geometry |
+ And there are no word tokens for postcodes 01982
+ When sending search query "111, 01982 Null Island"
+ Then results contain
+ | osm | display_name |
+ | N34 | 111, Null Island, 01982 |