defaults changed to be more in line with libpq defaults
This commit is contained in:
parent
fe74b91041
commit
d5bd9c904a
@ -1,10 +1,10 @@
|
||||
module.exports = {
|
||||
//database user's name
|
||||
user: '',
|
||||
user: process.env.USER,
|
||||
//name of database to connect
|
||||
database: '',
|
||||
database: process.env.USER,
|
||||
//database user's password
|
||||
password: '',
|
||||
password: null,
|
||||
//database port
|
||||
port: 5432,
|
||||
//number of rows to return at a time from a prepared statement's
|
||||
|
@ -4,8 +4,8 @@ test('client settings', function() {
|
||||
|
||||
test('defaults', function() {
|
||||
var client = new Client();
|
||||
assert.equal(client.user, '');
|
||||
assert.equal(client.database, '');
|
||||
assert.equal(client.user, process.env.USER);
|
||||
assert.equal(client.database, process.env.USER);
|
||||
assert.equal(client.port, 5432);
|
||||
});
|
||||
|
||||
@ -41,11 +41,11 @@ test('initializing from a config string', function() {
|
||||
|
||||
test('when not including all values the defaults are used', function() {
|
||||
var client = new Client("pg://host1")
|
||||
assert.equal(client.user, "")
|
||||
assert.equal(client.password, "")
|
||||
assert.equal(client.user, process.env.USER)
|
||||
assert.equal(client.password, null)
|
||||
assert.equal(client.host, "host1")
|
||||
assert.equal(client.port, 5432)
|
||||
assert.equal(client.database, "")
|
||||
assert.equal(client.database, process.env.USER)
|
||||
})
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user