X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/5781674c1b8c4935afd786246705460f7bd38b6d..6af8f8a9e37e92c139779fbb5fb2590ad040993e:/test/controllers/old_node_controller_test.rb diff --git a/test/controllers/old_node_controller_test.rb b/test/controllers/old_node_controller_test.rb index 5b0436348..f4e88ddd0 100644 --- a/test/controllers/old_node_controller_test.rb +++ b/test/controllers/old_node_controller_test.rb @@ -224,13 +224,13 @@ class OldNodeControllerTest < ActionController::TestCase get :history, :id => node.node_id assert_response :success, "Redaction shouldn't have stopped history working." - assert_select "osm node[id=#{node.node_id}][version=#{node.version}]", 0, "redacted node #{node.node_id} version #{node.version} shouldn't be present in the history." + assert_select "osm node[id='#{node.node_id}'][version='#{node.version}']", 0, "redacted node #{node.node_id} version #{node.version} shouldn't be present in the history." # not even to a logged-in user basic_authorization(users(:public_user).email, "test") get :history, :id => node.node_id assert_response :success, "Redaction shouldn't have stopped history working." - assert_select "osm node[id=#{node.node_id}][version=#{node.version}]", 0, "redacted node #{node.node_id} version #{node.version} shouldn't be present in the history, even when logged in." + assert_select "osm node[id='#{node.node_id}'][version='#{node.version}']", 0, "redacted node #{node.node_id} version #{node.version} shouldn't be present in the history, even when logged in." end ## @@ -253,10 +253,10 @@ class OldNodeControllerTest < ActionController::TestCase # and when accessed via history get :history, :id => node.node_id assert_response :success, "Redaction shouldn't have stopped history working." - assert_select "osm node[id=#{node.node_id}][version=#{node.version}]", 0, "node #{node.node_id} version #{node.version} should not be present in the history for moderators when not passing flag." + assert_select "osm node[id='#{node.node_id}'][version='#{node.version}']", 0, "node #{node.node_id} version #{node.version} should not be present in the history for moderators when not passing flag." get :history, :id => node.node_id, :show_redactions => 'true' assert_response :success, "Redaction shouldn't have stopped history working." - assert_select "osm node[id=#{node.node_id}][version=#{node.version}]", 1, "node #{node.node_id} version #{node.version} should still be present in the history for moderators when passing flag." + assert_select "osm node[id='#{node.node_id}'][version='#{node.version}']", 1, "node #{node.node_id} version #{node.version} should still be present in the history for moderators when passing flag." end # testing that if the moderator drops auth, he can't see the @@ -278,7 +278,7 @@ class OldNodeControllerTest < ActionController::TestCase # and when accessed via history get :history, :id => node.node_id assert_response :success, "Redaction shouldn't have stopped history working." - assert_select "osm node[id=#{node.node_id}][version=#{node.version}]", 0, "redacted node #{node.node_id} version #{node.version} shouldn't be present in the history." + assert_select "osm node[id='#{node.node_id}'][version='#{node.version}']", 0, "redacted node #{node.node_id} version #{node.version} shouldn't be present in the history." end def do_redact_node(node, redaction)