From 490bfdaebde051dda68b48b98594596630b5d5aa Mon Sep 17 00:00:00 2001 From: brianc Date: Tue, 26 Oct 2010 00:31:58 -0500 Subject: [PATCH] slight refactor to client integration tests in prep for deeper testing effort --- test/integration/client/simple-query-tests.js | 2 +- test/integration/client/test-helper.js | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/test/integration/client/simple-query-tests.js b/test/integration/client/simple-query-tests.js index 39425706..a8006d54 100644 --- a/test/integration/client/simple-query-tests.js +++ b/test/integration/client/simple-query-tests.js @@ -2,7 +2,7 @@ var helper = require(__dirname+"/test-helper"); //before running this test make sure you run the script create-test-tables test("selects rows", function() { var client = helper.client(); - client.connect(); + var query = client.query("select * from person"); var rowCount = 0; query.on('row', function(row) { diff --git a/test/integration/client/test-helper.js b/test/integration/client/test-helper.js index 64230336..dc1bc941 100644 --- a/test/integration/client/test-helper.js +++ b/test/integration/client/test-helper.js @@ -3,10 +3,12 @@ var helper = require(__dirname+'/../test-helper'); module.exports = { //creates a client from cli parameters client: function() { - return new Client({ + var client = new Client({ database: helper.args.database, user: helper.args.user, password: helper.args.password }); + client.connect(); + return client; } };