node-query/node_modules/pg/test/integration/client/empty-query-tests.js

18 lines
392 B
JavaScript

var helper = require(__dirname+'/test-helper');
var client = helper.client();
test("empty query message handling", function() {
assert.emits(client, 'drain', function() {
client.end();
});
client.query({text: ""});
});
test('callback supported', assert.calls(function() {
client.query("", function(err, result) {
assert.isNull(err);
assert.empty(result.rows);
})
}))