bookshelf-modelbase
Advanced tools
Comparing version 2.6.8 to 2.6.9
@@ -27,7 +27,5 @@ var extend = require('xtend') | ||
Joi.object(this.validate).keys(baseValidation) | ||
} else { | ||
this.validate = Joi.any() | ||
this.on('saving', this.validateSave) | ||
} | ||
this.on('saving', this.validateSave) | ||
}, | ||
@@ -34,0 +32,0 @@ |
{ | ||
"name": "bookshelf-modelbase", | ||
"version": "2.6.8", | ||
"version": "2.6.9", | ||
"description": "Extensible ModelBase for bookshelf-based model layers", | ||
@@ -5,0 +5,0 @@ "main": "./lib", |
@@ -40,8 +40,2 @@ /* global describe, before, beforeEach, it */ | ||
}) | ||
it('should default to any validation', function () { | ||
specimen = new ModelBase() | ||
expect(specimen.validate.isJoi).to.eql(true) | ||
expect(specimen.validate._type).to.eql('any') | ||
}) | ||
}) | ||
@@ -97,2 +91,11 @@ | ||
}) | ||
it('should not validate when Model.validate is not present', function () { | ||
var Model = ModelBase.extend({ tableName: 'test_table' }) | ||
return Model.forge({ id: 1 }) | ||
.save('first_name', 'notYoName') | ||
.then(function (model) { | ||
return expect(model.get('first_name')).to.equal('notYoName') | ||
}) | ||
}) | ||
}) | ||
@@ -99,0 +102,0 @@ |
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
17995
324