Add more assertions

This commit is contained in:
Raymond Feng 2013-11-08 09:02:17 -08:00
parent 0b899b0542
commit 92d369e609
1 changed files with 7 additions and 0 deletions

View File

@ -423,9 +423,16 @@ describe('Load models with base', function () {
var ds = new ModelBuilder();
var User = ds.define('User', {name: String});
User.staticMethod = function staticMethod() {};
User.prototype.instanceMethod = function instanceMethod() {};
var Customer = ds.define('Customer', {vip: Boolean}, {base: 'User'});
assert(Customer.prototype instanceof User);
assert(Customer.staticMethod === User.staticMethod);
assert(Customer.prototype.instanceMethod === User.prototype.instanceMethod);
try {
var Customer1 = ds.define('Customer1', {vip: Boolean}, {base: 'User1'});