test case for password containing a < or > sign

This commit is contained in:
burc sahinoglu 2012-06-13 12:46:47 -07:00
parent bb9cd85ff4
commit 3e70c457cc

View File

@ -143,4 +143,17 @@ test('libpq connection string building', function() {
}))
})
test('password contains < and/or > characters', function () {
var sourceConfig = {
user:'brian',
password: 'hello<ther>e',
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);
});
})