Allow to set enablePop3 when adding a mailbox
This commit is contained in:
@@ -119,16 +119,16 @@ describe('Mail', function () {
|
||||
|
||||
describe('mailboxes', function () {
|
||||
it('add user mailbox succeeds', async function () {
|
||||
await mail.addMailbox('girish', domain.domain, { ownerId: 'uid-0', ownerType: mail.OWNERTYPE_USER, active: true, storageQuota: 0, messagesQuota: 0 }, auditSource);
|
||||
await mail.addMailbox('girish', domain.domain, { ownerId: 'uid-0', ownerType: mail.OWNERTYPE_USER, active: true, enablePop3: false, storageQuota: 0, messagesQuota: 0 }, auditSource);
|
||||
});
|
||||
|
||||
it('cannot add dup entry', async function () {
|
||||
const [error] = await safe(mail.addMailbox('girish', domain.domain, { ownerId: 'uid-1', ownerType: mail.OWNERTYPE_GROUP, active: true, storageQuota: 0, messagesQuota: 0 }, auditSource));
|
||||
const [error] = await safe(mail.addMailbox('girish', domain.domain, { ownerId: 'uid-1', ownerType: mail.OWNERTYPE_GROUP, active: true, enablePop3: false, storageQuota: 0, messagesQuota: 0 }, auditSource));
|
||||
expect(error.reason).to.be(BoxError.ALREADY_EXISTS);
|
||||
});
|
||||
|
||||
it('add app mailbox succeeds', async function () {
|
||||
await mail.addMailbox('support', domain.domain, { ownerId: 'osticket', ownerType: 'user', active: true, storageQuota: 10, messagesQuota: 20}, auditSource);
|
||||
await mail.addMailbox('support', domain.domain, { ownerId: 'osticket', ownerType: 'user', active: true, enablePop3: true, storageQuota: 10, messagesQuota: 20}, auditSource);
|
||||
});
|
||||
|
||||
it('get succeeds', async function () {
|
||||
@@ -139,6 +139,7 @@ describe('Mail', function () {
|
||||
expect(mailbox.creationTime).to.be.a(Date);
|
||||
expect(mailbox.storageQuota).to.be(10);
|
||||
expect(mailbox.messagesQuota).to.be(20);
|
||||
expect(mailbox.enablePop3).to.be(true);
|
||||
});
|
||||
|
||||
it('get non-existent mailbox', async function () {
|
||||
@@ -147,11 +148,12 @@ describe('Mail', function () {
|
||||
});
|
||||
|
||||
it('update app mailbox succeeds', async function () {
|
||||
await mail.updateMailbox('support', domain.domain, { ownerId: 'osticket', ownerType: 'user', active: true, storageQuota: 20, messagesQuota: 30}, auditSource);
|
||||
await mail.updateMailbox('support', domain.domain, { ownerId: 'osticket', ownerType: 'user', active: true, enablePop3: true, storageQuota: 20, messagesQuota: 30}, auditSource);
|
||||
|
||||
const mailbox = await mail.getMailbox('support', domain.domain);
|
||||
expect(mailbox.storageQuota).to.be(20);
|
||||
expect(mailbox.messagesQuota).to.be(30);
|
||||
expect(mailbox.enablePop3).to.be(true);
|
||||
});
|
||||
|
||||
it('list mailboxes succeeds', async function () {
|
||||
|
||||
Reference in New Issue
Block a user