node-postgres/test/integration/client/empty-query-tests.js
Alexander Sulfrian 6b032c466b added test-binary target
integration tests could now be started in binary mode
some tests are executed in text mode anyway, they are currently not
compatible with binary mode or prepared statements at all
(f.e. multiple statements in one query)
2011-11-22 05:01:00 +01:00

18 lines
430 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: "", binary: false});
});
test('callback supported', assert.calls(function() {
client.query({text: "", binary: false}, function(err, result) {
assert.isNull(err);
assert.empty(result.rows);
})
}))