summaryrefslogtreecommitdiff
path: root/web-ui/test
diff options
context:
space:
mode:
authorFolker Bernitt <fbernitt@thoughtworks.com>2016-01-28 10:45:52 +0100
committerFolker Bernitt <fbernitt@thoughtworks.com>2016-01-28 10:47:02 +0100
commit36a9354b49062a8eb8c2737d8580f38d17391642 (patch)
tree843f981b1017babbcd29329043a4d593e4f874d4 /web-ui/test
parent8f07c10b906b5736a7330ba8eb42af6259e0797a (diff)
Add original attachments to forwared mails
- Issue #579
Diffstat (limited to 'web-ui/test')
-rw-r--r--web-ui/test/spec/mail_view/ui/forward_box.spec.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/web-ui/test/spec/mail_view/ui/forward_box.spec.js b/web-ui/test/spec/mail_view/ui/forward_box.spec.js
index 613baa47..de6a6b0d 100644
--- a/web-ui/test/spec/mail_view/ui/forward_box.spec.js
+++ b/web-ui/test/spec/mail_view/ui/forward_box.spec.js
@@ -78,6 +78,20 @@ describeComponent('mail_view/ui/forward_box', function () {
}));
});
+ it('should copy original message attachments', function() {
+ testMail = Pixelated.testData().parsedMail.withAttachments;
+ var mailSendEvent = spyOnEvent(document, Pixelated.events.mail.send);
+
+ this.setupComponent({ mail: testMail });
+
+ this.component.attr.recipientValues.to.push('forward_to@email.com');
+ $(document).trigger(Pixelated.events.ui.mail.send);
+
+ var sentMail = mailSendEvent.mostRecentCall.data;
+
+ expect(sentMail.attachments).toEqual(testMail.attachments);
+ });
+
it('triggers openMail when email is sent', function() {
var eventSpy = spyOnEvent(document, Pixelated.events.ui.mail.open);
this.setupComponent({ mail: testMail });