X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/ff17619a4071364ea15383c696cb7e84b6c83089..1fee1a1755e0b9ce88e1f9df5016f44b9982f368:/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 f944d90..0077d46 100644 --- a/modules/documentCanvas/tests/canvasNode.test.js +++ b/modules/documentCanvas/tests/canvasNode.test.js @@ -81,4 +81,16 @@ suite('meta attributes', function() { }); }); +suite('modifing node', function() { + test('changing class removes meta attributes', 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('author'); + + assert.equal(node.getMetaAttr('uri'), undefined); + }) +}) + }); \ No newline at end of file