add mail relay tests

part of #188
This commit is contained in:
Girish Ramakrishnan
2017-06-27 12:09:57 -05:00
parent c4d313a2c0
commit ad8ddf80f5
2 changed files with 72 additions and 0 deletions

View File

@@ -181,6 +181,26 @@ describe('Settings', function () {
});
});
it('can get mail relay', function (done) {
settings.getMailRelay(function (error, address) {
expect(error).to.be(null);
expect(address).to.eql({ enabled: false });
done();
});
});
it('can set mail relay', function (done) {
settings.setMailRelay({ enabled: true, host: 'mx.foo.com', port: 25 }, function (error) {
expect(error).to.be(null);
settings.getMailRelay(function (error, address) {
expect(error).to.be(null);
expect(address).to.eql({ enabled: true, host: 'mx.foo.com', port: 25 });
done();
});
});
});
it('can get catch all address', function (done) {
settings.getCatchAllAddress(function (error, address) {
expect(error).to.be(null);