X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/ac31ad7e5c9642a6703ae75ca072a43255e4a230..1fee1a1755e0b9ce88e1f9df5016f44b9982f368:/modules/documentCanvas/tests/canvasNode.test.js diff --git a/modules/documentCanvas/tests/canvasNode.test.js b/modules/documentCanvas/tests/canvasNode.test.js index 5dccf7b..0077d46 100644 --- a/modules/documentCanvas/tests/canvasNode.test.js +++ b/modules/documentCanvas/tests/canvasNode.test.js @@ -78,6 +78,18 @@ suite('meta attributes', function() { var node = canvasNode.create({tag: 'tag', meta: {a:'1'}}); node.setMetaAttr('a', '2'); assert.equal(node.dom.attr('wlxml-meta-a'), '2'); + }); +}); + +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); }) })