mirror of
https://github.com/moparisthebest/mail
synced 2024-11-26 10:52:17 -05:00
add tests
This commit is contained in:
parent
cf031a105e
commit
1fb092a79d
@ -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, ''),
|
||||||
|
@ -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({});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
Loading…
Reference in New Issue
Block a user