]> git.openstreetmap.org Git - nominatim.git/blob - tests/features/api/reverse_simple.feature
add functional tests
[nominatim.git] / tests / features / api / reverse_simple.feature
1 Feature: Simple Reverse Tests
2     Simple tests for internal server errors and response format.
3     These tests should pass on any Nominatim installation.
4
5     Scenario Outline: Simple reverse-geocoding
6         When looking up xml coordinates <lat>,<lon>
7         Then the result is valid xml
8         When looking up json coordinates <lat>,<lon>
9         Then the result is valid json
10         When looking up jsonv2 coordinates <lat>,<lon>
11         Then the result is valid json
12
13     Examples:
14      | lat      | lon
15      | 0.0      | 0.0
16      | 45.3     | 3.5
17      | -79.34   | 23.5
18      | 0.23     | -178.555
19
20     Scenario Outline: Wrapping of legal jsonp requests
21         Given the request parameters
22         | json_callback
23         | foo
24         When looking up <format> coordinates 67.3245,0.456
25         Then the result is valid json
26
27     Examples:
28       | format
29       | json
30       | jsonv2
31
32     Scenario: Reverse-geocoding without address
33         Given the request parameters
34           | addressdetails
35           | 0
36         When looking up xml coordinates 36.791966,127.171726
37         Then the result is valid xml
38         When looking up json coordinates 36.791966,127.171726
39         Then the result is valid json
40         When looking up jsonv2 coordinates 36.791966,127.171726
41         Then the result is valid json
42
43     Scenario: Reverse-geocoding with zoom
44         Given the request parameters
45           | zoom
46           | 10
47         When looking up xml coordinates 36.791966,127.171726
48         Then the result is valid xml
49         When looking up json coordinates 36.791966,127.171726
50         Then the result is valid json
51         When looking up jsonv2 coordinates 36.791966,127.171726
52         Then the result is valid json