]> git.openstreetmap.org Git - rails.git/blobdiff - test/controllers/geocoder_controller_test.rb
Merge remote-tracking branch 'upstream/pull/2597'
[rails.git] / test / controllers / geocoder_controller_test.rb
index 3f6e25ea6ae0c16a9e59d70f4e756b85f6b2f56b..0459eb2946ebb4762331445afbb248eb0ad91899 100644 (file)
@@ -1,5 +1,4 @@
 require "test_helper"
-require "geocoder_controller"
 
 class GeocoderControllerTest < ActionController::TestCase
   ##
@@ -237,9 +236,9 @@ class GeocoderControllerTest < ActionController::TestCase
   ##
   # Test identification of US zipcodes
   def test_identify_us_postcode
-    [
-      "12345",
-      "12345-6789"
+    %w[
+      12345
+      12345-6789
     ].each do |code|
       post :search, :params => { :query => code }
       assert_response :success
@@ -490,11 +489,11 @@ class GeocoderControllerTest < ActionController::TestCase
       assert_select "ul.results-list", 0
     else
       assert_select "ul.results-list", 1 do
-        assert_select "p.search_results_entry", results.count
+        assert_select "li.search_results_entry", results.count
 
         results.each do |result|
           attrs = result.collect { |k, v| "[data-#{k}='#{v}']" }.join("")
-          assert_select "p.search_results_entry a.set_position#{attrs}", result[:name]
+          assert_select "li.search_results_entry a.set_position#{attrs}", result[:name]
         end
       end
     end