summaryrefslogtreecommitdiff
path: root/web-ui/test/spec/mail_list
diff options
context:
space:
mode:
authorDuda Dornelles <ddornell@thoughtworks.com>2014-10-16 13:53:16 +0200
committerDuda Dornelles <ddornell@thoughtworks.com>2014-10-16 13:54:03 +0200
commit0de9d8dc31298921f7272d74cdd3c5d4217b5841 (patch)
tree468ba5005379151eff72c5aaaf37db9ba29b3ef7 /web-ui/test/spec/mail_list
parent761e85e523ec61f5629a9f1f6e4196e23ce96673 (diff)
decreasing count on tag and tag shortcut when email is read. we were
decreasing only tags that were also in the read mail, but we have also to look at the mailbox and compare that to the tags in the case of default tags #95
Diffstat (limited to 'web-ui/test/spec/mail_list')
-rw-r--r--web-ui/test/spec/mail_list/ui/mail_items/generic_mail_item.spec.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/web-ui/test/spec/mail_list/ui/mail_items/generic_mail_item.spec.js b/web-ui/test/spec/mail_list/ui/mail_items/generic_mail_item.spec.js
index ecb2b854..b03babb5 100644
--- a/web-ui/test/spec/mail_list/ui/mail_items/generic_mail_item.spec.js
+++ b/web-ui/test/spec/mail_list/ui/mail_items/generic_mail_item.spec.js
@@ -5,7 +5,8 @@ describeComponent('mail_list/ui/mail_items/generic_mail_item', function () {
beforeEach(function () {
mail = Pixelated.testData().parsedMail.simpleTextPlain;
- mail.tags = ['inbox'];
+ mail.tags = [];
+ mail.mailbox = 'inbox';
setupComponent('<li></li>', {
mail: mail,
@@ -95,7 +96,7 @@ describeComponent('mail_list/ui/mail_items/generic_mail_item', function () {
expect(this.component.attr.mail.status).toContain(this.component.status.READ);
expect(this.$node.attr('class')).toMatch('status-read');
- expect(mailReadEvent).toHaveBeenTriggeredOnAndWith(document, { ident: mail.ident, tags: ['inbox'] });
+ expect(mailReadEvent).toHaveBeenTriggeredOnAndWith(document, { ident: mail.ident, tags: [], mailbox: 'inbox' });
});
});
@@ -110,7 +111,8 @@ describeComponent('mail_list/ui/mail_items/generic_mail_item', function () {
this.$node.find('a').click();
- expect(mailReadEvent).toHaveBeenTriggeredOnAndWith(document, jasmine.objectContaining({ident: mail.ident}));
+ var expectedEventData = {ident: mail.ident};
+ expect(mailReadEvent).toHaveBeenTriggeredOnAndWith(document, jasmine.objectContaining(expectedEventData));
});
it('should not trigger mail:read event when clicking mail that is already read', function () {