summaryrefslogtreecommitdiff
path: root/web-ui/test/spec/mail_list/ui/mail_list.spec.js
diff options
context:
space:
mode:
Diffstat (limited to 'web-ui/test/spec/mail_list/ui/mail_list.spec.js')
-rw-r--r--web-ui/test/spec/mail_list/ui/mail_list.spec.js13
1 files changed, 12 insertions, 1 deletions
diff --git a/web-ui/test/spec/mail_list/ui/mail_list.spec.js b/web-ui/test/spec/mail_list/ui/mail_list.spec.js
index 5c285110..003830de 100644
--- a/web-ui/test/spec/mail_list/ui/mail_list.spec.js
+++ b/web-ui/test/spec/mail_list/ui/mail_list.spec.js
@@ -75,7 +75,18 @@ describeComponent('mail_list/ui/mail_list', function () {
it('returns the list of checked mails based on the current tag to whomever requests them', function () {
var caller = {};
this.component.attr.checkedMails = mailList;
- this.component.attr.currentTag = 'inbox';
+ this.component.attr.currentTag = 'inbox';
+ var mailHereCheckedEvent = spyOnEvent(caller, Pixelated.events.ui.mail.hereChecked);
+
+ $(document).trigger(Pixelated.events.ui.mail.wantChecked, caller);
+
+ expect(mailHereCheckedEvent).toHaveBeenTriggeredOnAndWith(caller, { checkedMails: mailList });
+ });
+
+ it('returns every checked mail when the curent tag is "all"', function () {
+ var caller = {};
+ this.component.attr.checkedMails = mailList;
+ this.component.attr.currentTag = 'all';
var mailHereCheckedEvent = spyOnEvent(caller, Pixelated.events.ui.mail.hereChecked);
$(document).trigger(Pixelated.events.ui.mail.wantChecked, caller);