smartxml: fixing changing tag of a root node
[fnpeditor.git] / src / smartxml / smartxml.test.js
index 938e5f7..e58e754 100644 (file)
@@ -105,6 +105,12 @@ describe('smartxml', function() {
                     expect(node.getTagName()).to.equal('header');
                     expect(node.getData()).to.eql({key: 'value'});
                 });
+
+                it('can change document root tag name', function() {
+                    var doc = getDocumentFromXML('<div></div>');
+                    doc.root.setTag('span');
+                    expect(doc.root.getTagName()).to.equal('span');
+                });
             });