diff options
Diffstat (limited to 'web-ui/test/spec/mail_view/data/attachment_list.spec.js')
-rw-r--r-- | web-ui/test/spec/mail_view/data/attachment_list.spec.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/web-ui/test/spec/mail_view/data/attachment_list.spec.js b/web-ui/test/spec/mail_view/data/attachment_list.spec.js index 3d93537b..45167e33 100644 --- a/web-ui/test/spec/mail_view/data/attachment_list.spec.js +++ b/web-ui/test/spec/mail_view/data/attachment_list.spec.js @@ -16,6 +16,20 @@ describeMixin('mail_view/data/attachment_list', function () { expect(this.component.attr.attachments).toEqual([stubAttachment, anotherStubAttachment]); }); + it('should reset attachment list on compose', function () { + this.component.attr.attachments = ['some array']; + $(document).trigger(Pixelated.events.mail.resetAttachments); + + expect(this.component.attr.attachments).toEqual([]); + }); + + it('should reset attachment list and tear down when email sent', function () { + this.component.attr.attachments = ['some array']; + $(document).trigger(Pixelated.events.mail.sent); + + expect(this.component.attr.attachments).toEqual([]); + }); + }); }); |