From 293eaf8b0f90e89406f1080c513162026c862d66 Mon Sep 17 00:00:00 2001 From: brianc Date: Mon, 15 Aug 2011 20:37:46 -0500 Subject: [PATCH] failing test for inconsistent js/native query api --- test/integration/client/api-tests.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/test/integration/client/api-tests.js b/test/integration/client/api-tests.js index 533a0641..314e4501 100644 --- a/test/integration/client/api-tests.js +++ b/test/integration/client/api-tests.js @@ -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'); + })) + })) +})