smartxml: loading new xml content to an existing document instance
[fnpeditor.git] / src / smartxml / smartxml.test.js
index d997aa7..da1b335 100644 (file)
@@ -30,6 +30,15 @@ describe('smartxml', function() {
             var doc = getDocumentFromXML('<div></div>');
             expect(doc.root.getTagName()).to.equal('div');
         });
+
+        it('can resets its content entirely', function() {
+            var doc = getDocumentFromXML('<div></div>');
+
+            expect(doc.root.getTagName()).to.equal('div');
+
+            doc.loadXML('<header></header>');
+            expect(doc.root.getTagName()).to.equal('header');
+        });
     });
 
     describe('Basic ElementNode properties', function() {