diff options
author | Patrick Maia <patrickjourdanmaia@gmail.com> | 2014-08-07 14:37:03 -0300 |
---|---|---|
committer | Patrick Maia <patrickjourdanmaia@gmail.com> | 2014-08-07 14:37:03 -0300 |
commit | 44fe6003ffdf6ab50feca5dd755d10e17b12846d (patch) | |
tree | cf4e8a8e67512dc7af1880db4c577426ead4d9a9 /web-ui/test | |
parent | 118e0428b906ed02f0189ffb23d7b67d1d8c4a1d (diff) |
fixes bug in which plain text emails were not being properly formatted
Diffstat (limited to 'web-ui/test')
-rw-r--r-- | web-ui/test/spec/helpers/view_helper.spec.js | 6 | ||||
-rw-r--r-- | web-ui/test/test_data.js | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/web-ui/test/spec/helpers/view_helper.spec.js b/web-ui/test/spec/helpers/view_helper.spec.js index 7fa10e56..1bcf68dd 100644 --- a/web-ui/test/spec/helpers/view_helper.spec.js +++ b/web-ui/test/spec/helpers/view_helper.spec.js @@ -59,6 +59,12 @@ define(['helpers/view_helper'], function (viewHelper) { expect(viewHelper.formatMailBody(testData.parsedMail.html)).toContainHtml('<p>Hello everyone!</p>'); }); + it('formats the body of a plain text email', function () { + var formatedMail = $('<div></div>'); + formatedMail.html(viewHelper.formatMailBody(testData.parsedMail.simpleTextPlain)); + expect(formatedMail).toContainHtml('<p>Hello Everyone</p>'); + }); + it('decodes a quoted-printable email body', function () { var result = viewHelper.formatMailBody(testData.parsedMail.htmlQuotedPrintable); diff --git a/web-ui/test/test_data.js b/web-ui/test/test_data.js index 8c7b6f21..c32bc65f 100644 --- a/web-ui/test/test_data.js +++ b/web-ui/test/test_data.js @@ -84,7 +84,7 @@ define(function() { ident:1, tags:['textplain','inbox'], status:[], - body: 'Porro quam minus. Doloribus odio vel. Placeat alias sed est assumenda qui esse. Tenetur tempora deserunt est consequatur ducimus laborum. Velit dolor voluptatibus.\n\nRerum repellendus tempore. Aliquam dolores laudantium amet et dolor voluptas. Quod eos magni mollitia et ex. Corrupti quis reprehenderit quasi. Quam cum nobis voluptas accusamus quisquam ut asperiores.\n\nFacilis dicta mollitia non molestiae. Eligendi perspiciatis aut qui eos qui. Laborum cumque odit velit nobis. Cumque quo impedit dignissimos quia.', + body: 'Hello Everyone', isSentMail: function() { return false; }, isDraftMail: function() { return false; }, replyToAddress: function() { return { to: ['laurel@hamill.info'], cc: [] }; }, |