config parser parses user name and passoword for database

This commit is contained in:
Taka Goto
2018-09-12 09:43:18 -05:00
parent d417b9cf3d
commit 0b987b3261
3 changed files with 8 additions and 4 deletions
+4 -2
View File
@@ -16,7 +16,9 @@ describe('parseConfig', () => {
database: {
hostname: 'example.com',
name: 'example_database',
port: '1234'
port: '1234',
user: 'user',
password: 'password'
}
};
@@ -31,7 +33,7 @@ describe('parseConfig', () => {
const databaseConfig = parseConfig(
readCallback, tomlParseCallback, configPath);
expect(databaseConfig.host).toEqual('postgres://example.com:1234');
expect(databaseConfig.host).toEqual('postgres://user:password@example.com:1234');
});
it('provides the database name', () => {