Add more assertions
This commit is contained in:
parent
0b899b0542
commit
92d369e609
|
@ -423,9 +423,16 @@ describe('Load models with base', function () {
|
||||||
var ds = new ModelBuilder();
|
var ds = new ModelBuilder();
|
||||||
|
|
||||||
var User = ds.define('User', {name: String});
|
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'});
|
var Customer = ds.define('Customer', {vip: Boolean}, {base: 'User'});
|
||||||
|
|
||||||
assert(Customer.prototype instanceof User);
|
assert(Customer.prototype instanceof User);
|
||||||
|
assert(Customer.staticMethod === User.staticMethod);
|
||||||
|
assert(Customer.prototype.instanceMethod === User.prototype.instanceMethod);
|
||||||
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
var Customer1 = ds.define('Customer1', {vip: Boolean}, {base: 'User1'});
|
var Customer1 = ds.define('Customer1', {vip: Boolean}, {base: 'User1'});
|
||||||
|
|
Loading…
Reference in New Issue