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

Commit a035a929 by Mick Hansen

Merge pull request #2617 from mbroadst/fix-timestamp-test

fix hardcoded timezone test
2 parents 22f0f451 40348916
Showing with 6 additions and 2 deletions
......@@ -20,12 +20,16 @@ if (dialect !== 'sqlite') {
});
it('returns the same value for current timestamp', function () {
var query = "SELECT now() as now";
var now = 'now()';
var query = "SELECT " + now + " as now";
var startQueryTime = Date.now();
return Promise.all([
this.sequelize.query(query),
this.sequelizeWithTimezone.query(query)
]).spread(function (now1, now2) {
expect(now1[0].now.getTime()).to.be.closeTo(now2[0].now.getTime(), 50);
var elapsedQueryTime = Date.now() - startQueryTime;
expect(now1[0].now.getTime()).to.be.closeTo(now2[0].now.getTime(), elapsedQueryTime);
});
});
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!