diff options
author | kaeff <hi@kaeff.net> | 2015-08-17 15:56:50 +0200 |
---|---|---|
committer | kaeff <hi@kaeff.net> | 2015-08-17 15:56:50 +0200 |
commit | b16bae353e40fa05b4993ef68232a9df83db370e (patch) | |
tree | 0768a89a5b98e26b31b52e59aa21fc4a358af8ba /web-ui/test/spec | |
parent | 57376b6cb20b0d4af0e5940f29229421adf8679f (diff) |
Read encoding from attachment info instead of headers
Clean up by removing now unused headers from attachment info, and add a
unit test for attachment rendering
Diffstat (limited to 'web-ui/test/spec')
-rw-r--r-- | web-ui/test/spec/mail_view/ui/mail_view.spec.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/web-ui/test/spec/mail_view/ui/mail_view.spec.js b/web-ui/test/spec/mail_view/ui/mail_view.spec.js index deb7fb88..fe763919 100644 --- a/web-ui/test/spec/mail_view/ui/mail_view.spec.js +++ b/web-ui/test/spec/mail_view/ui/mail_view.spec.js @@ -265,6 +265,16 @@ describeComponent('mail_view/ui/mail_view', function () { expect(openNoMessageSelectedEvent).toHaveBeenTriggeredOn(document); }); + it('shows a download link for attachments', function() { + var withAttachments = {mail: Pixelated.testData().parsedMail.withAttachments}; + + this.component.displayMail({}, withAttachments); + + var attachmentLink = $(this.component.$node.find('.attachmentsArea li').html()); + var expectedLink = '/attachment/912ec803b2ce49e4a541068d495ab570?encoding=base64&filename=filename.txt'; + expect(attachmentLink.attr('href')) .toBe(expectedLink); + }); + function creatingEvent(event, keyCode) { var e = $.Event(event); e.which = keyCode; |