X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/1f2f8117ae10eaebde925989e1b3710c8cc47323..5c2e36d7dbb5d7437b70183f87fb68ccb6c5d866:/modules/documentCanvas/tests/canvasNode.test.js?ds=sidebyside 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