From 6f735831127c409884f8000b188fb8b504e167e8 Mon Sep 17 00:00:00 2001 From: bmc Date: Tue, 29 Jan 2013 20:06:50 -0600 Subject: [PATCH] add another test for weird connection strings --- test/unit/connection-parameters/creation-tests.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/unit/connection-parameters/creation-tests.js b/test/unit/connection-parameters/creation-tests.js index caba6349..c1249437 100644 --- a/test/unit/connection-parameters/creation-tests.js +++ b/test/unit/connection-parameters/creation-tests.js @@ -149,4 +149,12 @@ test('libpq connection string building', function() { assert.equal(subject.password, sourceConfig.password); }); + test('password contains weird characters', function() { + var strang = 'pg://my first name:is&%awesome!@localhost:9000'; + var subject = new ConnectionParameters(strang); + assert.equal(subject.user, 'my first name'); + assert.equal(subject.password, 'is&%awesome!'); + assert.equal(subject.host, 'localhost'); + }); + });