diff --git a/test/unit/view/partials/signatureSpec.js b/test/unit/view/partials/signatureSpec.js
index 8a627510..620babae 100644
--- a/test/unit/view/partials/signatureSpec.js
+++ b/test/unit/view/partials/signatureSpec.js
@@ -146,9 +146,7 @@ describe('SwaggerUi.partials.signature tests', function () {
expect(sut.createXMLSample(name, definition)).to.equal(expected);
});
- });
- describe('array', function () {
it('returns tag stringstring when passing string items with name', function () {
var expected = 'stringstring';
var name = 'animals';
@@ -167,9 +165,7 @@ describe('SwaggerUi.partials.signature tests', function () {
expect(sut.createXMLSample(name, definition)).to.equal(expected);
});
- });
- describe('array', function () {
it('returns tag stringstring when passing string items with name and {wrapped: true}', function () {
var expected = 'stringstring';
var name = 'animals';
@@ -189,6 +185,59 @@ describe('SwaggerUi.partials.signature tests', function () {
expect(sut.createXMLSample(name, definition)).to.equal(expected);
});
+
+ it('return correct nested wrapped array', function () {
+ var expected = 'stringstringstringstring';
+ var name = 'animals';
+ var definition = {
+ type: 'array',
+ items: {
+ type: 'array',
+ items: {
+ type: 'string'
+ },
+ xml: {
+ name: 'cat'
+ }
+ },
+ xml: {
+ wrapped: true,
+ name: 'aliens'
+ }
+ };
+
+ expect(sut.createXMLSample(name, definition)).to.equal(expected);
+ });
+
+ it('return correct nested wrapped array', function () {
+ var expected = '' +
+ 'stringstring' +
+ 'stringstring' +
+ '';
+ var name = 'animals';
+ var definition = {
+ type: 'array',
+ items: {
+ type: 'array',
+ items: {
+ type: 'string',
+ xml: {
+ name: 'cat'
+ }
+ },
+ xml: {
+ name: 'cats',
+ wrapped: true
+ }
+ },
+ xml: {
+ wrapped: true,
+ name: 'aliens'
+ }
+ };
+
+ expect(sut.createXMLSample(name, definition)).to.equal(expected);
+ });
});
});
});