mirror of
https://github.com/brianc/node-postgres.git
synced 2026-01-18 15:55:05 +00:00
Add missing integeration test for date type parser.
We don't parse date types in the javascript binary parser. Keep this in mind if you plan to use the binary javascript parser.
This commit is contained in:
parent
85829a98d3
commit
bab01eac40
@ -145,3 +145,18 @@ helper.pg.connect(helper.config, assert.calls(function(err, client) {
|
||||
sink.add();
|
||||
})
|
||||
}))
|
||||
|
||||
if(!helper.config.binary) {
|
||||
test("postgres date type", function() {
|
||||
var client = helper.client();
|
||||
client.on('error', function(err) {
|
||||
console.log(err);
|
||||
client.end();
|
||||
});
|
||||
client.query("SELECT '2010-10-31'::date", assert.calls(function(err, result){
|
||||
assert.isNull(err);
|
||||
assert.UTCDate(result.rows[0].date, 2010, 9, 31, 0, 0, 0, 0);
|
||||
}));
|
||||
client.on('drain', client.end.bind(client));
|
||||
});
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user