Merge branch 'open316' into open199

This commit is contained in:
Henry 2015-11-17 14:31:06 -08:00
commit ba669f1395
2 changed files with 5 additions and 1 deletions

View File

@ -157,7 +157,7 @@ define(
};
TypeImpl.prototype.getInitialModel = function () {
return this.typeDef.model || {};
return JSON.parse(JSON.stringify(this.typeDef.model || {}));
};
TypeImpl.prototype.getDefinition = function () {

View File

@ -101,6 +101,10 @@ define(
expect(type.getInitialModel().someKey).toEqual("some value");
});
it("provides a fresh initial model each time", function () {
expect(type.getInitialModel().someKey).toEqual("some value");
});
it("provides type properties", function () {
expect(type.getProperties().length).toEqual(1);
});