X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/07e57daf2b2d80c5034bdc57998a95e61d54ceea..839d203d5121482e9bcd998749d410f541ce2f51:/test/controllers/geocoder_controller_test.rb diff --git a/test/controllers/geocoder_controller_test.rb b/test/controllers/geocoder_controller_test.rb index dd740e570..029ccbbd5 100644 --- a/test/controllers/geocoder_controller_test.rb +++ b/test/controllers/geocoder_controller_test.rb @@ -364,7 +364,7 @@ class GeocoderControllerTest < ActionDispatch::IntegrationTest assert_response :success assert_template :search assert_template :layout => "map" - assert_equal %w[latlon osm_nominatim_reverse], assigns(:sources) + assert_equal %w[latlon osm_nominatim_reverse], assigns(:sources).pluck(:name) assert_nil @controller.params[:query] assert_in_delta lat, @controller.params[:lat] assert_in_delta lon, @controller.params[:lon] @@ -373,7 +373,7 @@ class GeocoderControllerTest < ActionDispatch::IntegrationTest assert_response :success assert_template :search assert_template :layout => "xhr" - assert_equal %w[latlon osm_nominatim_reverse], assigns(:sources) + assert_equal %w[latlon osm_nominatim_reverse], assigns(:sources).pluck(:name) assert_nil @controller.params[:query] assert_in_delta lat, @controller.params[:lat] assert_in_delta lon, @controller.params[:lon] @@ -384,13 +384,13 @@ class GeocoderControllerTest < ActionDispatch::IntegrationTest assert_response :success assert_template :search assert_template :layout => "map" - assert_equal sources, assigns(:sources) + assert_equal sources, assigns(:sources).pluck(:name) get search_path(:query => query), :xhr => true assert_response :success assert_template :search assert_template :layout => "xhr" - assert_equal sources, assigns(:sources) + assert_equal sources, assigns(:sources).pluck(:name) end def results_check(*results) @@ -415,6 +415,6 @@ class GeocoderControllerTest < ActionDispatch::IntegrationTest assert_response :success assert_template :error assert_template :layout => nil - assert_select "p.search_results_error", error + assert_select ".alert.alert-danger", error end end