X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/db17af19bb75a09494868e002ae6680c6d05cab3..d7fd3fb6e571e106b6f9613687e657299104d131:/test/functional/changeset_controller_test.rb?ds=inline diff --git a/test/functional/changeset_controller_test.rb b/test/functional/changeset_controller_test.rb index 1e20f640b..a6eeaeeeb 100644 --- a/test/functional/changeset_controller_test.rb +++ b/test/functional/changeset_controller_test.rb @@ -308,14 +308,22 @@ EOF diff.root = XML::Node.new "osmChange" delete = XML::Node.new "delete" diff.root << delete - delete << current_relations(:public_used_relation).to_xml_node - delete << current_relations(:public_visible_relation).to_xml_node + delete << current_relations(:visible_relation).to_xml_node + delete << current_relations(:used_relation).to_xml_node delete << current_ways(:used_way).to_xml_node delete << current_nodes(:node_used_by_relationship).to_xml_node + # update the changeset to one that this user owns + changeset_id = changesets(:public_user_first_change).id + ["node", "way", "relation"].each do |type| + delete.find("//osmChange/delete/#{type}").each do |n| + n['changeset'] = changeset_id.to_s + end + end + # upload it content diff - post :upload, :id => changesets(:public_user_first_change).id + post :upload, :id => changeset_id assert_response :success, "can't upload a deletion diff to changeset: #{@response.body}"