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

Commit dc2cb90f by Nick Mitchinson

Adding test

1 parent c6fc9f7e
Showing with 20 additions and 0 deletions
...@@ -370,6 +370,26 @@ if (dialect.match(/^postgres/)) { ...@@ -370,6 +370,26 @@ if (dialect.match(/^postgres/)) {
}) })
}) })
describe('timestamps', function () {
beforeEach( function (done) {
this.User = this.sequelize.define('User', {
dates : DataTypes.ARRAY(DataTypes.DATE)
})
this.User.sync({ force: true }).success(function() {
done()
})
})
it('should use postgres "TIMESTAMP WITH TIME ZONE" instead of "DATETIME"', function (done) {
this.User.create({
dates: []
}).on('sql', function(sql) {
expect(sql.indexOf('TIMESTAMP WITH TIME ZONE')).to.be.greaterThan(0)
done()
})
})
})
describe('model', function() { describe('model', function() {
it("create handles array correctly", function(done) { it("create handles array correctly", function(done) {
this.User this.User
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!