Set search input value to 'lat, lon' params if query param is missing
This commit is contained in:
parent
38cb875c20
commit
0e3f0fbfd4
2 changed files with 21 additions and 2 deletions
14
test/system/search_test.rb
Normal file
14
test/system/search_test.rb
Normal file
|
@ -0,0 +1,14 @@
|
|||
require "application_system_test_case"
|
||||
|
||||
class SearchTest < ApplicationSystemTestCase
|
||||
test "click on 'where is this' sets search input value" do
|
||||
stub_request(:get, %r{^https://nominatim\.openstreetmap\.org/reverse\?})
|
||||
.to_return(:status => 404)
|
||||
|
||||
visit "/#map=7/1.234/6.789"
|
||||
|
||||
assert_field "Search", :with => ""
|
||||
click_on "Where is this?"
|
||||
assert_field "Search", :with => "1.234, 6.789"
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue