test if mailbox is updated with username change

This commit is contained in:
Girish Ramakrishnan
2016-09-25 23:58:17 -07:00
parent cd500adfe4
commit b40e740110

View File

@@ -624,6 +624,18 @@ describe('User', function () {
});
});
});
it('updated the mailbox', function (done) {
mailboxdb.getMailbox(USERNAME, function (error) {
expect(error.reason).to.be(DatabaseError.NOT_FOUND);
mailboxdb.getMailbox(USERNAME_NEW.toLowerCase(), function (error, mailbox) {
expect(error).to.be(null);
expect(mailbox.ownerId).to.be(userObject.id);
done();
});
});
});
});
describe('admin change triggers mail', function () {