failing test for inconsistent js/native query api

This commit is contained in:
brianc 2011-08-15 20:37:46 -05:00
parent f726bf29ef
commit 293eaf8b0f

View File

@ -129,3 +129,17 @@ test('can provide callback and config object', function() {
}))
}))
})
test('can provide callback and config and parameters', function() {
pg.connect(connectionString, assert.calls(function(err, client) {
assert.isNull(err);
var config = {
text: 'select $1::text as val'
};
client.query(config, ['hi'], assert.calls(function(err, result) {
assert.isNull(err);
assert.equal(result.rows.length, 1);
assert.equal(result.rows[0].val, 'hi');
}))
}))
})