X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/b31ffcb46eae55b9c66457e2330b16e8db84f1d6..875bfe398124d8aabd01787b99fd53d5c64bb59e:/src/smartxml/smartxml.test.js?ds=sidebyside diff --git a/src/smartxml/smartxml.test.js b/src/smartxml/smartxml.test.js index cc68cdd..57f11cc 100644 --- a/src/smartxml/smartxml.test.js +++ b/src/smartxml/smartxml.test.js @@ -1273,6 +1273,13 @@ describe('smartxml', function() { expect(doc.root.getAttr('test'), '3'); }); + it('ignores empty transactions', function() { + var doc = getDocumentFromXML('
'); + doc.startTransaction(); + doc.endTransaction(); + expect(doc.undoStack).to.have.length(0, 'empty transaction doesn\'t get pushed into undo stack'); + }); + it('doesn\'t break on optimizations', function() { // This is a smoke test checking if optimizations made to transaction undoing // doesnt't break anything.