diff --git a/test/fixtures/json/model/custom.json b/test/fixtures/json/model/custom.json index bbf37764..10060211 100644 --- a/test/fixtures/json/model/custom.json +++ b/test/fixtures/json/model/custom.json @@ -22,6 +22,11 @@ "name": "value", "isAttr": true, "type": "String" + }, + { + "name": "paths", + "type": "String", + "isMany": true } ] }, diff --git a/test/spec/features/copy-paste/ModdleCopySpec.js b/test/spec/features/copy-paste/ModdleCopySpec.js index 3b2c5f38..4fa2a0c1 100644 --- a/test/spec/features/copy-paste/ModdleCopySpec.js +++ b/test/spec/features/copy-paste/ModdleCopySpec.js @@ -781,6 +781,40 @@ describe('features/copy-paste/ModdleCopy', function() { }); + + describe('custom', function() { + + var customPackage = require('../../../fixtures/json/model/custom.json'); + + beforeEach(bootstrapModeler(basicXML, { + modules: testModules, + moddleExtensions: { + custom: customPackage + } + })); + + + it('should copy arrays of strings', inject(function(moddle, moddleCopy) { + + // given + var paths = [ 'A', 'B', 'C' ]; + + var customElement = moddle.create('custom:CustomSendElement', { + paths: paths + }); + + // when + var newElement = moddleCopy.copyElement(customElement, moddle.create('custom:CustomSendElement')); + + // then + expect(newElement.paths).to.have.length(3); + expect(newElement.paths).to.eql(paths); + + expectNoAttrs(newElement); + })); + + }); + });