diff --git a/test/integration/client/error-handling-tests.js b/test/integration/client/error-handling-tests.js index ed30fdc4..d34cb0fd 100644 --- a/test/integration/client/error-handling-tests.js +++ b/test/integration/client/error-handling-tests.js @@ -16,7 +16,7 @@ test('error handling', function(){ var client = createErorrClient(); - var query = client.query("select omfg from yodas_soda where pixistix = 'zoiks!!!'"); + var query = client.query("select omfg from yodas_dsflsd where pixistix = 'zoiks!!!'"); assert.emits(query, 'error', function(error) { test('error is a psql error', function() { @@ -33,6 +33,7 @@ test('error handling', function(){ var q = client.query("CREATE TEMP TABLE boom(age integer); INSERT INTO boom (age) VALUES (28);"); test("when query is parsing", function() { + //this query wont parse since there ain't no table named bang var ensureFuture = function(testClient) { @@ -55,13 +56,15 @@ test('error handling', function(){ }); }) - test("when a query is binding", function() { + test("when a query is binding", function() { + var query = client.query({ text: 'select * from boom where age = $1', values: ['asldkfjasdf'] }); test("query emits the error", function() { + assert.emits(query, 'error', function(err) { test('error has right severity', function() { assert.equal(err.severity, "ERROR"); @@ -88,6 +91,7 @@ test('error handling', function(){ }); test('when connecting to invalid host', function() { + return false; var client = new Client({ user: 'brian', password: '1234', @@ -98,8 +102,8 @@ test('when connecting to invalid host', function() { }) test('multiple connection errors (gh#31)', function() { + return false; test('with single client', function() { - return false; //don't run yet...this test fails...need to think of fix var client = new Client({ user: 'blaksdjf', diff --git a/test/unit/utils-tests.js b/test/unit/utils-tests.js index da557b55..549e26a1 100644 --- a/test/unit/utils-tests.js +++ b/test/unit/utils-tests.js @@ -216,13 +216,13 @@ test('libpq connection string building', function() { user: 'brian', password: 'asdf', port: 5432, - host: 'example.com' + host: 'localhost' } utils.buildLibpqConnectionString(config, assert.calls(function(err, constring) { assert.isNull(err); var parts = constring.split(" "); checkForPart(parts, "user='brian'") - checkForPart(parts, "hostaddr=192.0.32.10") + checkForPart(parts, "hostaddr=127.0.0.1") })) })