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

add tests

This commit is contained in:
Tankred Hase 2013-12-05 15:22:44 +01:00
parent cf031a105e
commit 1fb092a79d
2 changed files with 10 additions and 1 deletions

View File

@ -181,7 +181,7 @@ define(function(require) {
// //
function notificationForEmail(email) { function notificationForEmail(email) {
chrome.notifications.create('i' + email.uid, { chrome.notifications.create('' + email.uid, {
type: 'basic', type: 'basic',
title: email.from[0].name || email.from[0].address, title: email.from[0].name || email.from[0].address,
message: email.subject.replace(str.subjectPrefix, ''), message: email.subject.replace(str.subjectPrefix, ''),

View File

@ -130,6 +130,15 @@ define(function(require) {
outbox._processOutbox(onOutboxUpdate); outbox._processOutbox(onOutboxUpdate);
}); });
it('should fire notification', function(done) {
outbox.onSent = function(email) {
expect(email).to.exist;
done();
};
outbox._onSent({});
});
}); });
}); });
}); });