1 require_relative "queries_controller_test"
4 class NominatimReverseQueriesControllerTest < QueriesControllerTest
6 # test all routes which lead to this controller
9 { :path => "/search/nominatim_reverse_query", :method => :post },
10 { :controller => "searches/nominatim_reverse_queries", :action => "create" }
15 with_http_stubs "nominatim" do
16 post search_nominatim_reverse_query_path(:lat => 51.7632, :lon => -0.0076, :zoom => 15), :xhr => true
17 results_check :name => "Broxbourne, Hertfordshire, East of England, England, United Kingdom",
18 :lat => 51.7465723, :lon => -0.0190782,
19 :type => "node", :id => 28825933, :zoom => 15
21 post search_nominatim_reverse_query_path(:lat => 51.7632, :lon => -0.0076, :zoom => 17), :xhr => true
22 results_check :name => "Dinant Link Road, Broxbourne, Hertfordshire, East of England, England, EN11 8HX, United Kingdom",
23 :lat => 51.7634883, :lon => -0.0088373,
24 :type => "way", :id => 3489841, :zoom => 17
26 post search_nominatim_reverse_query_path(:lat => 13.7709, :lon => 100.50507, :zoom => 19), :xhr => true
27 results_check :name => "MM Steak&Grill, ถนนศรีอยุธยา, บางขุนพรหม, กรุงเทพมหานคร, เขตดุสิต, กรุงเทพมหานคร, 10300, ประเทศไทย",
28 :lat => 13.7708691, :lon => 100.505073233221,
29 :type => "way", :id => 542901374, :zoom => 19