From: Tom Hughes Date: Sat, 10 Jan 2015 15:36:44 +0000 (+0000) Subject: Don't try and match xmlns as an attribute X-Git-Tag: live~4281^2~1 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/7f81de2065c1d3fabb0048ec380c9fae0f48a32a Don't try and match xmlns as an attribute This doesn't seem to work with the new nokogiri based matching in rails 4.2 probably because the attribute is removed by the parser and used to set the namespace of the element. --- diff --git a/test/controllers/api_controller_test.rb b/test/controllers/api_controller_test.rb index a0421c033..ba8bdbae6 100644 --- a/test/controllers/api_controller_test.rb +++ b/test/controllers/api_controller_test.rb @@ -102,7 +102,7 @@ class ApiControllerTest < ActionController::TestCase bbox = "#{minlon},#{minlat},#{maxlon},#{maxlat}" get :trackpoints, :bbox => bbox assert_response :success - assert_select "gpx[version='1.0'][creator='OpenStreetMap.org'][xmlns='http://www.topografix.com/GPX/1/0']", :count => 1 do + assert_select "gpx[version='1.0'][creator='OpenStreetMap.org']", :count => 1 do assert_select "trk" do assert_select "trkseg" end @@ -118,7 +118,7 @@ class ApiControllerTest < ActionController::TestCase bbox = "#{minlon},#{minlat},#{maxlon},#{maxlat}" get :trackpoints, :bbox => bbox assert_response :success - assert_select "gpx[version='1.0'][creator='OpenStreetMap.org'][xmlns='http://www.topografix.com/GPX/1/0']", :count => 1 do + assert_select "gpx[version='1.0'][creator='OpenStreetMap.org']", :count => 1 do assert_select "trk", :count => 1 do assert_select "trk > trkseg", :count => 2 do |trksegs| trksegs.each do |trkseg| @@ -140,7 +140,7 @@ class ApiControllerTest < ActionController::TestCase bbox = "#{minlon},#{minlat},#{maxlon},#{maxlat}" get :trackpoints, :bbox => bbox assert_response :success - assert_select "gpx[version='1.0'][creator='OpenStreetMap.org'][xmlns='http://www.topografix.com/GPX/1/0']", :count => 1 do + assert_select "gpx[version='1.0'][creator='OpenStreetMap.org']", :count => 1 do assert_select "trk", :count => 1 do assert_select "trk>name", :count => 1 assert_select "trk>desc", :count => 1