1
0
mirror of https://github.com/moparisthebest/mail synced 2024-11-26 02:42:17 -05:00

fix wrong api usage in outbox

This commit is contained in:
Felix Hammerl 2013-12-04 15:36:20 +01:00
parent d42c654675
commit 59d00f0de9
2 changed files with 6 additions and 2 deletions

View File

@ -222,7 +222,9 @@ define(function(require) {
function sendEncrypted(email) {
removeFromPendingMails(email);
self._emailDao.sendEncrypted(email, function(err) {
self._emailDao.sendEncrypted({
email: email
}, function(err) {
if (err) {
self._outboxBusy = false;
callback(err);

View File

@ -80,7 +80,9 @@ define(function(require) {
dummyMails = [member, invited, notinvited];
emailDaoStub.list.yieldsAsync(null, dummyMails);
emailDaoStub.sendEncrypted.yieldsAsync();
emailDaoStub.sendEncrypted.withArgs(sinon.match(function(opts) {
return typeof opts.email !== 'undefined' && opts.email.to.address === member.to.address;
})).yieldsAsync();
emailDaoStub.sendPlaintext.yieldsAsync();
devicestorageStub.removeList.yieldsAsync();
invitationDaoStub.check.withArgs(sinon.match(function(o) {