Commit 439563aa authored by David Gatica's avatar David Gatica

Function createCos, added

parent 2f45a98a
...@@ -400,6 +400,11 @@ class ZimbraAdminApi { ...@@ -400,6 +400,11 @@ class ZimbraAdminApi {
return this.create('Domain', resource_data, callback); return this.create('Domain', resource_data, callback);
} }
createCos(name, attributes, callback ) {
const resource_data = this.buildResourceData(name, attributes);
return this.create('Cos', resource_data, callback);
}
getDistributionList(identifier, callback) { getDistributionList(identifier, callback) {
return this.get('DistributionList', identifier, callback); return this.get('DistributionList', identifier, callback);
} }
......
...@@ -826,6 +826,22 @@ var zimbraAdminPassword = process.env.ZIMBRA_PASSWORD || '12345678'; ...@@ -826,6 +826,22 @@ var zimbraAdminPassword = process.env.ZIMBRA_PASSWORD || '12345678';
}); });
}); });
});
describe('COS tests', function() {
this.timeout(5000);
it('Should create a COS', function(done){
let api = new ZimbraAdminApi(auth_data);
let cos_name = Date.now();
let attrs={'zimbraFeatureContactsEnabled' : 'FALSE'};
api.createCos(cos_name, attrs, function(err, cos){
if (err) return console.error(err);
expect(err).to.be.null;
done();
});
})
}); });
describe('DistributionList tests', function() { describe('DistributionList tests', function() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment