+ # this shouldn't work as with the 0.6 api we need pay load to delete
+ delete :delete, :id => current_ways(:visible_way).id
+ assert_response :bad_request
+
+ # Now try without having a changeset
+ content "<osm><way id='#{current_ways(:visible_way).id}'></osm>"
+ delete :delete, :id => current_ways(:visible_way).id
+ assert_response :bad_request
+
+ # try to delete with an invalid (closed) changeset
+ content update_changeset(current_ways(:visible_way).to_xml,
+ changesets(:normal_user_closed_change).id)
+ delete :delete, :id => current_ways(:visible_way).id
+ assert_response :conflict
+
+ # try to delete with an invalid (non-existent) changeset
+ content update_changeset(current_ways(:visible_way).to_xml,0)
+ delete :delete, :id => current_ways(:visible_way).id
+ assert_response :conflict
+
+ # Now try with a valid changeset
+ content current_ways(:visible_way).to_xml