-
- def test_xml_from_id_zero
- id_list = ["", "0", "00", "0.0", "a"]
- id_list.each do |id|
- zero_id = "<osm><changeset id='#{id}' /></osm>"
- assert_nothing_raised(OSM::APIBadUserInput) {
- Changeset.from_xml(zero_id, true)
- }
- message_update = assert_raise(OSM::APIBadUserInput) {
- Changeset.from_xml(zero_id, false)
- }
- assert_match /ID of changeset cannot be zero when updating/, message_update.message
- end
- end
-