X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/1f2f8117ae10eaebde925989e1b3710c8cc47323..faae581f8b54b9cd3000d3060c446ed7dfe13447:/modules/documentCanvas/tests/canvasNode.test.js?ds=inline diff --git a/modules/documentCanvas/tests/canvasNode.test.js b/modules/documentCanvas/tests/canvasNode.test.js index 444ee0f..2452fff 100644 --- a/modules/documentCanvas/tests/canvasNode.test.js +++ b/modules/documentCanvas/tests/canvasNode.test.js @@ -96,6 +96,13 @@ suite('meta attributes', function() { assert.equal(node.getMetaAttr('uri'), undefined); }); + + test('changing class to another with the same attribute keeps the value', function() { + var node = canvasNode.create({tag: 'span', klass: 'uri', meta: {uri: 'http://some.uri.com'}}); + assert.equal(node.getMetaAttr('uri'), 'http://some.uri.com'); + node.setClass('uri-subclass'); + assert.equal(node.getMetaAttr('uri'), 'http://some.uri.com'); + }); }); }); \ No newline at end of file