]> git.openstreetmap.org Git - rails.git/blob - test/system/search_test.rb
Set search input value to 'lat, lon' params if query param is missing
[rails.git] / test / system / search_test.rb
1 require "application_system_test_case"
2
3 class SearchTest < ApplicationSystemTestCase
4   test "click on 'where is this' sets search input value" do
5     stub_request(:get, %r{^https://nominatim\.openstreetmap\.org/reverse\?})
6       .to_return(:status => 404)
7
8     visit "/#map=7/1.234/6.789"
9
10     assert_field "Search", :with => ""
11     click_on "Where is this?"
12     assert_field "Search", :with => "1.234, 6.789"
13   end
14 end