added check for month in assert.UTCDate and fixed broken test
This commit is contained in:
parent
494c167960
commit
8ffdfc16e4
@ -49,6 +49,9 @@ assert.UTCDate = function(actual, year, month, day, hours, min, sec, milisecond)
|
|||||||
var actualYear = actual.getUTCFullYear();
|
var actualYear = actual.getUTCFullYear();
|
||||||
assert.equal(actualYear, year, "expected year " + year + " but got " + actualYear);
|
assert.equal(actualYear, year, "expected year " + year + " but got " + actualYear);
|
||||||
|
|
||||||
|
var actualMonth = actual.getUTCMonth();
|
||||||
|
assert.equal(actualMonth, month, "expected month " + month + " but got " + actualMonth);
|
||||||
|
|
||||||
var actualDate = actual.getUTCDate();
|
var actualDate = actual.getUTCDate();
|
||||||
assert.equal(actualDate, day, "expected day " + day + " but got " + actualDate);
|
assert.equal(actualDate, day, "expected day " + day + " but got " + actualDate);
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ test('typed results', function() {
|
|||||||
dataTypeID: 1184,
|
dataTypeID: 1184,
|
||||||
actual: '2011-01-23 22:05:00.68-06',
|
actual: '2011-01-23 22:05:00.68-06',
|
||||||
expected: function(val) {
|
expected: function(val) {
|
||||||
assert.UTCDate(val, 2011, 01, 24, 4, 5, 00, 680);
|
assert.UTCDate(val, 2011, 0, 24, 4, 5, 00, 680);
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
name: 'timestampz with huge miliseconds in UTC',
|
name: 'timestampz with huge miliseconds in UTC',
|
||||||
|
Loading…
Reference in New Issue
Block a user