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:
booo 2012-08-01 18:44:37 +02:00
parent 85829a98d3
commit bab01eac40

View File

@ -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));
});
}