2 Feature: Updates of linked places
3 Tests that linked places are correctly added and deleted.
6 Scenario: Add linked place when linking relation is renamed
8 | osm_id | class | type | name | geometry
9 | 1 | place | city | foo | 0 0
11 | osm_type | osm_id | class | type | name | admin_level | geometry
12 | R | 1 | boundary | administrative | foo | 8 | poly-area:0.1
14 And sending query "foo" with dups
18 When updating place areas
19 | osm_type | osm_id | class | type | name | admin_level | geometry
20 | R | 1 | boundary | administrative | foobar | 8 | poly-area:0.1
21 Then table placex contains
22 | object | linked_place_id
24 When updating place areas
25 | osm_type | osm_id | class | type | name | admin_level | geometry
26 When sending query "foo" with dups
31 Scenario: Add linked place when linking relation is removed
33 | osm_id | class | type | name | geometry
34 | 1 | place | city | foo | 0 0
36 | osm_type | osm_id | class | type | name | admin_level | geometry
37 | R | 1 | boundary | administrative | foo | 8 | poly-area:0.1
39 And sending query "foo" with dups
43 When marking for delete R1
44 Then table placex contains
45 | object | linked_place_id
47 When updating place areas
48 | osm_type | osm_id | class | type | name | admin_level | geometry
49 And sending query "foo" with dups
54 Scenario: Remove linked place when linking relation is added
56 | osm_id | class | type | name | geometry
57 | 1 | place | city | foo | 0 0
59 And sending query "foo" with dups
63 When updating place areas
64 | osm_type | osm_id | class | type | name | admin_level | geometry
65 | R | 1 | boundary | administrative | foo | 8 | poly-area:0.1
66 Then table placex contains
67 | object | linked_place_id
69 When sending query "foo" with dups
74 Scenario: Remove linked place when linking relation is renamed
76 | osm_id | class | type | name | geometry
77 | 1 | place | city | foo | 0 0
79 | osm_type | osm_id | class | type | name | admin_level | geometry
80 | R | 1 | boundary | administrative | foobar | 8 | poly-area:0.1
82 And sending query "foo" with dups
86 When updating place areas
87 | osm_type | osm_id | class | type | name | admin_level | geometry
88 | R | 1 | boundary | administrative | foo | 8 | poly-area:0.1
89 Then table placex contains
90 | object | linked_place_id
92 When sending query "foo" with dups