From b06b794de750d972a9dff9165e203815b79c5b62 Mon Sep 17 00:00:00 2001 From: Alexandre Pretto Date: Thu, 8 Jan 2015 18:48:48 -0200 Subject: #157: mail api to return htmlBody and textPlainBody so the UI doesnt have to parse the multipart mails anymore --- web-ui/test/spec/helpers/view_helper.spec.js | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'web-ui/test/spec/helpers/view_helper.spec.js') diff --git a/web-ui/test/spec/helpers/view_helper.spec.js b/web-ui/test/spec/helpers/view_helper.spec.js index 217ac890..3399baa8 100644 --- a/web-ui/test/spec/helpers/view_helper.spec.js +++ b/web-ui/test/spec/helpers/view_helper.spec.js @@ -11,7 +11,7 @@ define(['helpers/view_helper'], function (viewHelper) { describe('quote email', function() { it('should add > to body text', function() { - testData.rawMail.mail.body = 'First Line\nSecond Line'; + testData.rawMail.mail.textPlainBody = 'First Line\nSecond Line'; var quotedMail = viewHelper.quoteMail(testData.rawMail.mail); @@ -55,20 +55,10 @@ define(['helpers/view_helper'], function (viewHelper) { }); }); - it('formats the body of a multipart email', function () { - expect(viewHelper.formatMailBody(testData.parsedMail.html)).toContainHtml('

Hello everyone!

'); - }); - it('formats the body of a plain text email', function () { var formatedMail = $('
'); formatedMail.html(viewHelper.formatMailBody(testData.parsedMail.simpleTextPlain)); - expect(formatedMail).toContainHtml('

Hello Everyone

'); - }); - - it('decodes a quoted-printable email body', function () { - var result = viewHelper.formatMailBody(testData.parsedMail.htmlQuotedPrintable); - - expect(result).toContainHtml('

Hello everyone!

'); + expect(formatedMail).toContainHtml('

HNello Everyone

'); }); it('move caret to the end of text after 1ms', function () { -- cgit v1.2.3