# read the first element
read_or_die
- begin
+ while @reader.node_type != 15 do # end element
# because we read elements in DOM-style to reuse their DOM
# parsing code, we don't always read an element on each pass
# as the call to @reader.next in the innermost loop will take
else
read_or_die
end
- end while @reader.node_type != 15 # end element
+ end
end
read_or_die
end
"shouldn't be able to re-use placeholder IDs"
end
+ ##
+ # test for more issues in #1568
+ def test_upload_empty_invalid
+ basic_authorization "test@openstreetmap.org", "test"
+
+ [ "<osmChange/>",
+ "<osmChange></osmChange>",
+ "<osmChange><modify/></osmChange>",
+ "<osmChange><modify></modify></osmChange>"
+ ].each do |diff|
+ # upload it
+ content diff
+ post :upload, :id => 1
+ assert_response(:success, "should be able to upload " +
+ "empty changeset: " + diff)
+ end
+ end
+
##
# when we make some simple changes we get the same changes back from the
# diff download.