remove mail domain add/remove API

merge this as a transaction into domains API

fixes #669
This commit is contained in:
Girish Ramakrishnan
2020-03-31 12:04:46 -07:00
parent e30ea9f143
commit 3fec599c0c
16 changed files with 54 additions and 319 deletions

View File

@@ -1777,7 +1777,6 @@ describe('database', function () {
before(function (done) {
async.series([
domaindb.add.bind(null, DOMAIN_0.domain, { zoneName: DOMAIN_0.zoneName, provider: DOMAIN_0.provider, config: DOMAIN_0.config, tlsConfig: DOMAIN_0.tlsConfig }),
maildb.add.bind(null, DOMAIN_0.domain, {})
], done);
});
@@ -1951,23 +1950,6 @@ describe('database', function () {
database._clear(done);
});
it('cannot add non-existing domain', function (done) {
maildb.add(MAIL_DOMAIN_0.domain + 'nope', {}, function (error) {
expect(error).to.be.ok();
expect(error.reason).to.be(BoxError.NOT_FOUND);
done();
});
});
it('can add domain', function (done) {
maildb.add(MAIL_DOMAIN_0.domain, {}, function (error) {
expect(error).to.equal(null);
done();
});
});
it('can get all domains', function (done) {
maildb.list(function (error, result) {
expect(error).to.equal(null);