diff options
Diffstat (limited to 'web-ui/test/spec/mail_list/ui')
-rw-r--r-- | web-ui/test/spec/mail_list/ui/mail_items/mail_item.spec.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/web-ui/test/spec/mail_list/ui/mail_items/mail_item.spec.js b/web-ui/test/spec/mail_list/ui/mail_items/mail_item.spec.js index 058040c9..b1ac3037 100644 --- a/web-ui/test/spec/mail_list/ui/mail_items/mail_item.spec.js +++ b/web-ui/test/spec/mail_list/ui/mail_items/mail_item.spec.js @@ -10,6 +10,7 @@ describeMixin('mail_list/ui/mail_items/mail_item', function () { selected: false, tag: 'inbox' }); + this.component.attachListeners(); }); describe('mail checkbox', function () { @@ -20,6 +21,14 @@ describeMixin('mail_list/ui/mail_items/mail_item', function () { checkbox = this.component.$node.find('input[type=checkbox]'); }); + it('unchecks itself when another tag is selected', function () { + this.component.checkCheckbox(); + this.component.trigger(document, Pixelated.events.ui.tag.select, { tag: 'amazing'}); + + expect(mailUncheckedEvent).toHaveBeenTriggeredOn(document); + expect(checkbox.prop('checked')).toBe(false); + }); + it('checkCheckbox checks it and triggers events.ui.mail.checked', function () { this.component.checkCheckbox(); |