X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/d2daf4834ec70add492c9d4649620fc5ea7585d0..fb23a597811c4c60dd1b9bddeab4335a33bee8c1:/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.