From 3e70c457cc201b7538156660d3cb22aabe2dd8aa Mon Sep 17 00:00:00 2001 From: burc sahinoglu Date: Wed, 13 Jun 2012 12:46:47 -0700 Subject: [PATCH] test case for password containing a < or > sign --- test/unit/utils-tests.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/test/unit/utils-tests.js b/test/unit/utils-tests.js index f7fa07c5..134fa50e 100644 --- a/test/unit/utils-tests.js +++ b/test/unit/utils-tests.js @@ -143,4 +143,17 @@ test('libpq connection string building', function() { })) }) + test('password contains < and/or > characters', function () { + var sourceConfig = { + user:'brian', + password: 'helloe', + port: 5432, + host: 'localhost', + database: 'postgres' + } + var connectionString = 'pg://' + sourceConfig.user + ':' + sourceConfig.password + '@' + sourceConfig.host + ':' + sourceConfig.port + '/' + sourceConfig.database; + var config = utils.parseConnectionString(connectionString); + assert.same(config, sourceConfig); + }); + })