X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/ff03138a978406b431da71aba64941d87b509098..abf3358ce505c7e67a92d895a6b5cd4a641855d9:/test/unit/node_test.rb diff --git a/test/unit/node_test.rb b/test/unit/node_test.rb index dd907f0f4..24300e428 100644 --- a/test/unit/node_test.rb +++ b/test/unit/node_test.rb @@ -270,6 +270,18 @@ class NodeTest < ActiveSupport::TestCase assert_match /Must specify a string with one or more characters/, message_update.message end + def test_from_xml_no_node + no_node = "" + message_create = assert_raise(OSM::APIBadXMLError) { + Node.from_xml(no_node, true) + } + assert_match /XML doesn't contain an osm\/node element/, message_create.message + message_update = assert_raise(OSM::APIBadXMLError) { + Node.from_xml(no_node, false) + } + assert_match /XML doesn't contain an osm\/node element/, message_update.message + end + def test_from_xml_no_k_v nokv = "" message_create = assert_raise(OSM::APIBadXMLError) {