2010-10-30 09:33:53 +08:00
|
|
|
var helper = require(__dirname+'/test-helper');
|
|
|
|
var client = helper.client();
|
|
|
|
|
|
|
|
test("empty query message handling", function() {
|
2011-03-04 02:21:43 +08:00
|
|
|
assert.emits(client, 'drain', function() {
|
2011-03-04 02:23:02 +08:00
|
|
|
client.end();
|
|
|
|
});
|
|
|
|
client.query("");
|
2010-10-30 09:33:53 +08:00
|
|
|
});
|
2011-02-23 09:16:05 +08:00
|
|
|
|
|
|
|
test('callback supported', assert.calls(function() {
|
|
|
|
client.query("", function(err, result) {
|
|
|
|
assert.isNull(err);
|
|
|
|
assert.empty(result.rows);
|
|
|
|
})
|
|
|
|
}))
|
|
|
|
|