X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/b31ffcb46eae55b9c66457e2330b16e8db84f1d6..94e3767f1597835ac82361d7d04be1347fe40942:/src/smartxml/smartxml.test.js 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.