X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/1f2f8117ae10eaebde925989e1b3710c8cc47323..9db0e3facfdcb376b589ea922215bbdb1a3d1787:/modules/documentCanvas/tests/canvasNode.test.js 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