add mailboxDomain field to apps table

This commit is contained in:
Girish Ramakrishnan
2019-11-14 21:43:14 -08:00
parent 97333474c4
commit 5509406395
11 changed files with 83 additions and 54 deletions

View File

@@ -480,6 +480,7 @@ describe('App API', function () {
expect(res.body.id).to.eql(APP_ID);
expect(res.body.installationState).to.be.ok();
expect(res.body.mailboxName).to.be(APP_LOCATION + '.app');
expect(res.body.mailboxDomain).to.be(DOMAIN_0.domain);
done();
});
});
@@ -1153,6 +1154,7 @@ describe('App API', function () {
if (error) return done(error);
expect(app.mailboxName).to.be(APP_LOCATION_NEW + '.app'); // must follow location change
expect(app.mailboxDomain).to.be(DOMAIN_0.domain);
docker.getContainer(app.containerId).inspect(function (error, data) {
expect(error).to.not.be.ok();
@@ -1364,7 +1366,7 @@ describe('App API', function () {
it('can set mailbox', function (done) {
superagent.post(SERVER_URL + '/api/v1/apps/' + APP_ID + '/configure/mailbox')
.query({ access_token: token })
.send({ mailboxName: 'genos' })
.send({ mailboxName: 'genos', mailboxDomain: DOMAIN_0.domain })
.end(function (err, res) {
expect(res.statusCode).to.equal(202);
taskId = res.body.taskId;
@@ -1392,7 +1394,7 @@ describe('App API', function () {
it('can reset mailbox', function (done) {
superagent.post(SERVER_URL + '/api/v1/apps/' + APP_ID + '/configure/mailbox')
.query({ access_token: token })
.send({ mailboxName: null })
.send({ mailboxName: null, mailboxDomain: DOMAIN_0.domain })
.end(function (err, res) {
expect(res.statusCode).to.equal(202);
taskId = res.body.taskId;