1 Feature: Tests for finding places by osm_type and osm_id
2 Simple tests for response format.
4 Scenario Outline: Address lookup for existing object
5 When sending v1/lookup with format <format>
7 | N5484325405,W43327921,,R123924,X99,N0 |
8 Then a HTTP 200 is returned
9 And the result is valid <outformat>
10 And exactly 3 results are returned
13 | format | outformat |
18 | geocodejson | geocodejson |
20 Scenario: Address lookup for non-existing or invalid object
21 When sending v1/lookup
23 | X99,,N0,nN158845944,ABC,,W9 |
24 Then a HTTP 200 is returned
25 And the result is valid xml
26 And exactly 0 results are returned
28 Scenario Outline: Boundingbox is returned
29 When sending v1/lookup with format <format>
31 | N5484325405,W43327921 |
32 Then the result is valid <outformat>
33 And the result set contains exactly
34 | object | boundingbox!in_box |
35 | N5484325405 | 47.135,47.14,9.52,9.525 |
36 | W43327921 | 47.07,47.08,9.50,9.52 |
39 | format | outformat |
45 Scenario: Linked places return information from the linkee
46 When sending v1/lookup with format geocodejson
49 Then the result is valid geocodejson
50 And exactly 1 result is returned
51 And all results contain
55 Scenario Outline: Force error by providing too many ids
56 When sending v1/lookup with format <format>
58 | N1,N2,N3,N4,N5,N6,N7,N8,N9,N10,N11,N12,N13,N14,N15,N16,N17,N18,N19,N20,N21,N22,N23,N24,N25,N26,N27,N28,N29,N30,N31,N32,N33,N34,N35,N36,N37,N38,N39,N40,N41,N42,N43,N44,N45,N46,N47,N48,N49,N50,N51 |
59 Then a HTTP 400 is returned
60 And the result is valid <outformat>
61 And the result contains
62 | error+code | error+message |
63 | 400 | Too many object IDs. |
66 | format | outformat |
71 | geocodejson | json |