X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/fb23a597811c4c60dd1b9bddeab4335a33bee8c1..cb5f162babe577ede5a113b49d072b51a97ecaad:/src/wlxml/wlxml.test.js diff --git a/src/wlxml/wlxml.test.js b/src/wlxml/wlxml.test.js index 9f846f6..516b47c 100644 --- a/src/wlxml/wlxml.test.js +++ b/src/wlxml/wlxml.test.js @@ -27,9 +27,14 @@ describe('WLXMLDocument', function() { expect(node.getClass()).to.equal('class.subclass'); }); - it('returns attributes other than class and meta-* as other attributes', function() { - var node = nodeFromXML(''); - expect(node.getOtherAttributes()).to.eql({attr1: 'val1', attr2: 'val2'}); + it('returns unregistered attributes', function() { + var testClasses = { + 'testClass': { + attrs: {'attr1': {type: 'string'}} + } + }, + doc = getDocumentFromXML('', {wlxmlClasses: testClasses}); + expect(doc.root.getOtherAttributes()).to.eql({attr: {value:'val'}}); }); }); @@ -76,7 +81,7 @@ describe('WLXMLDocument', function() { } }, node = getDocumentFromXML( - '', + '', {wlxmlClasses: testClasses} ).root, attrs = node.getMetaAttributes();