Fix failing tests

This commit is contained in:
Girish Ramakrishnan
2021-04-30 09:44:25 -07:00
parent 549b2f2a6b
commit 44027f61e6
3 changed files with 14 additions and 9 deletions
+5 -5
View File
@@ -567,7 +567,7 @@ describe('Mail API', function () {
describe('mailboxes', function () {
it('add succeeds', function (done) {
superagent.post(SERVER_URL + '/api/v1/mail/' + DOMAIN_0.domain + '/mailboxes')
.send({ name: MAILBOX_NAME, ownerId: userId, ownerType: 'user' })
.send({ name: MAILBOX_NAME, ownerId: userId, ownerType: 'user', active: true })
.query({ access_token: token })
.end(function (err, res) {
expect(res.statusCode).to.equal(201);
@@ -577,7 +577,7 @@ describe('Mail API', function () {
it('cannot add again', function (done) {
superagent.post(SERVER_URL + '/api/v1/mail/' + DOMAIN_0.domain + '/mailboxes')
.send({ name: MAILBOX_NAME, ownerId: userId, ownerType: 'user' })
.send({ name: MAILBOX_NAME, ownerId: userId, ownerType: 'user', active: true })
.query({ access_token: token })
.end(function (err, res) {
expect(res.statusCode).to.equal(409);
@@ -662,7 +662,7 @@ describe('Mail API', function () {
it('add the mailbox', function (done) {
superagent.post(SERVER_URL + '/api/v1/mail/' + DOMAIN_0.domain + '/mailboxes')
.send({ name: MAILBOX_NAME, ownerId: userId, ownerType: 'user' })
.send({ name: MAILBOX_NAME, ownerId: userId, ownerType: 'user', active: true })
.query({ access_token: token })
.end(function (err, res) {
expect(res.statusCode).to.equal(201);
@@ -769,7 +769,7 @@ describe('Mail API', function () {
it('add succeeds', function (done) {
superagent.post(SERVER_URL + '/api/v1/mail/' + DOMAIN_0.domain + '/lists')
.send({ name: LIST_NAME, members: [ `admin2@${DOMAIN_0.domain}`, `${USERNAME}@${DOMAIN_0.domain}`], membersOnly: false })
.send({ name: LIST_NAME, members: [ `admin2@${DOMAIN_0.domain}`, `${USERNAME}@${DOMAIN_0.domain}`], membersOnly: false, active: true })
.query({ access_token: token })
.end(function (err, res) {
expect(res.statusCode).to.equal(201);
@@ -779,7 +779,7 @@ describe('Mail API', function () {
it('add twice fails', function (done) {
superagent.post(SERVER_URL + '/api/v1/mail/' + DOMAIN_0.domain + '/lists')
.send({ name: LIST_NAME, members: [ `admin2@${DOMAIN_0.domain}`, `${USERNAME}@${DOMAIN_0.domain}`], membersOnly: false })
.send({ name: LIST_NAME, members: [ `admin2@${DOMAIN_0.domain}`, `${USERNAME}@${DOMAIN_0.domain}`], membersOnly: false, active: true })
.query({ access_token: token })
.end(function (err, res) {
expect(res.statusCode).to.equal(409);