mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-02-17 07:33:57 +00:00
42 lines
1.3 KiB
JavaScript
42 lines
1.3 KiB
JavaScript
import config from '../lib/config'
|
|
|
|
beforeAll(function () {
|
|
jasmine.DEFAULT_TIMEOUT_INTERVAL = config.timeout || 10000;
|
|
});
|
|
|
|
describe('config tests', function() {
|
|
|
|
it('required configuration parameters', async function() {
|
|
expect(config.hostname)
|
|
.withContext(`Config 'hostname'`)
|
|
.toBeDefined()
|
|
expect(config.username)
|
|
.withContext(`Config 'username'`)
|
|
.toBeDefined()
|
|
expect(config.subscriber_username)
|
|
.withContext(`Config 'subscriber_username'`)
|
|
.toBeDefined()
|
|
expect(config.attendee1)
|
|
.withContext(`Config 'attendee1'`)
|
|
.toBeDefined()
|
|
expect(config.attendee1_delegate)
|
|
.withContext(`Config 'attendee1_delegate'`)
|
|
.toBeDefined()
|
|
expect(config.mailserver)
|
|
.withContext(`Config 'mailserver'`)
|
|
.toBeDefined()
|
|
|
|
expect(config.subscriber_username)
|
|
.withContext(`Config 'subscriber_username' and 'attendee1_username'`)
|
|
.toEqual(config.attendee1_username)
|
|
|
|
let userHash = {}
|
|
const userList = [config.username, config.subscriber_username, config.attendee1_delegate_username]
|
|
for (let user of userList) {
|
|
expect(userHash[user])
|
|
.withContext(`username, subscriber_username, attendee1_delegate_username must all be different users ('${user}')`)
|
|
.toBeUndefined()
|
|
userHash[user] = true
|
|
}
|
|
})
|
|
}) |