From 7f81de2065c1d3fabb0048ec380c9fae0f48a32a Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Sat, 10 Jan 2015 15:36:44 +0000 Subject: [PATCH] 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. --- test/controllers/api_controller_test.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 -- 2.43.2