getting data from postgres successfully

This commit is contained in:
Chris Troutner
2019-01-21 18:33:27 -08:00
parent 55f649cb13
commit 3063d7abdc
4 changed files with 44 additions and 32 deletions
+22 -21
View File
@@ -22,31 +22,32 @@ describe('#iRedMail', () => {
if (process.env.TEST_ENV === 'integration') {
testType = 'integration'
iRedMail = new IRedMail()
await iRedMail.sequelize.authenticate()
// iRedMail = new IRedMail()
// await iRedMail.sequelize.authenticate()
}
})
describe('#createUser', () => {
it('should get database models', async () => {
try {
console.log(`Hello world!`)
/*
const options = {
method: 'POST',
uri: `${LOCALHOST}/iredmail/adduser`,
resolveWithFullResponse: true,
json: true,
body: {
}
}
if (process.env.TEST_ENV === 'integration') {
it('should get database models', async () => {
try {
// console.log(`Hello world!`)
let result = await rp(options)
console.log(`result: ${util.inspect(result)}`)
*/
} catch (err) {
console.log(`Error in #createUser test: `, err)
}
})
const options = {
method: 'POST',
uri: `${LOCALHOST}/iredmail/adduser`,
resolveWithFullResponse: true,
json: true,
body: {
}
}
let result = await rp(options)
console.log(`result: ${util.inspect(result.body)}`)
} catch (err) {
console.log(`Error in #createUser test: `, err)
}
})
}
})
})