不要怂,就是干,撸起袖子干!

Commit 1dfb1ebd by Dr. Evil

Minor fixes following to PR discussion

1 parent 57b54c4b
......@@ -410,7 +410,7 @@ var pgRangeSubtypes = {
RANGE.prototype.key = RANGE.key = 'RANGE';
RANGE.prototype.toSql = function() {
return pgRangeSubtypes[this._subtype.toLowerCase()] || pgRangeSubtypes['integer'];
return pgRangeSubtypes[this._subtype.toLowerCase()];
};
/**
......@@ -510,7 +510,7 @@ ENUM.prototype.key = ENUM.key = 'ENUM';
* @property ARRAY
*/
var ARRAY = function(type) {
var options = _.isPlainObject(type) && !(type instanceof ABSTRACT) && type || {
var options = _.isPlainObject(type) ? type : {
type: type
};
if (!(this instanceof ARRAY)) return new ARRAY(options);
......
......@@ -55,16 +55,12 @@ if (dialect.match(/^postgres/)) {
period: [new Date(2015, 0, 1), new Date(2015, 0, 3)]
})
.then(function () {
return Booking
return expect(Booking
.create({
roomNo: 1,
guestName: 'Frequent Visitor',
period: [new Date(2015, 0, 2), new Date(2015, 0, 5)]
})
.done(function (err) {
expect(!!err).to.be.ok;
expect(err instanceof Sequelize.ExclusionConstraintError).to.be.ok;
});
})).to.eventually.be.rejectedWith(Sequelize.ExclusionConstraintError);
});
});
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!