Skip to content

Commit 6f73583

Browse files
committed
add another test for weird connection strings
1 parent 77daa06 commit 6f73583

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/unit/connection-parameters/creation-tests.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,4 +149,12 @@ test('libpq connection string building', function() {
149149
assert.equal(subject.password, sourceConfig.password);
150150
});
151151

152+
test('password contains weird characters', function() {
153+
var strang = 'pg://my first name:is&%awesome!@localhost:9000';
154+
var subject = new ConnectionParameters(strang);
155+
assert.equal(subject.user, 'my first name');
156+
assert.equal(subject.password, 'is&%awesome!');
157+
assert.equal(subject.host, 'localhost');
158+
});
159+
152160
});

0 commit comments

Comments
 (0)