promised-models
Advanced tools
Comparing version 0.0.5 to 0.0.6
@@ -51,3 +51,3 @@ /** | ||
isNew: function () { | ||
return Boolean(this.id); | ||
return !this.id; | ||
}, | ||
@@ -54,0 +54,0 @@ |
{ | ||
"description": "promise based, typed attributes, nested models and collections", | ||
"name": "promised-models", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"repository": "git@github.com:delfrrr/promised-models.git", | ||
@@ -6,0 +6,0 @@ "keywords": [ |
@@ -6,2 +6,10 @@ | ||
var Model = require('./models/persistent'); | ||
describe('isNew', function () { | ||
it('should be true after model create', function () { | ||
var model = new Model(); | ||
expect(model.isNew()).to.be.equal(true); | ||
}); | ||
}); | ||
it('should save and fetch model by id', function (done) { | ||
@@ -8,0 +16,0 @@ var model1 = new Model(); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
83446
2120