Add unit-test for "array" type

Add a unit-test to capture the fact that a property type can be
specified as `type: 'array'`.
This commit is contained in:
Miroslav Bajtoš 2015-05-04 15:00:06 +02:00
parent ef0a10dbb6
commit f4be88357c
1 changed files with 10 additions and 0 deletions

View File

@ -390,5 +390,15 @@ describe('ModelDefinition class', function () {
done();
});
});
it('should support "array" type shortcut', function() {
var Model = memory.createModel('TwoArrays', {
regular: Array,
sugar: 'array'
});
var props = Model.definition.properties;
props.regular.type.should.equal(props.sugar.type);
});
});