Add setting for catch all address

Note that this is not a flag on the mailboxes because we might theoretically
support forwarding to some other external domain in the future.

Part of #33
This commit is contained in:
Girish Ramakrishnan
2017-06-11 17:51:08 -07:00
parent da7648fe3f
commit 0cc980f539
7 changed files with 174 additions and 7 deletions

View File

@@ -181,6 +181,26 @@ describe('Settings', function () {
});
});
it('can get catch all address', function (done) {
settings.getCatchAllAddress(function (error, address) {
expect(error).to.be(null);
expect(address).to.eql([ ]);
done();
});
});
it('can set catch all address', function (done) {
settings.setCatchAllAddress([ "user1", "user2" ], function (error) {
expect(error).to.be(null);
settings.getCatchAllAddress(function (error, address) {
expect(error).to.be(null);
expect(address).to.eql([ "user1", "user2" ]);
done();
});
});
});
it('can get all values', function (done) {
settings.getAll(function (error, allSettings) {
expect(error).to.be(null);