diff options
author | Alexandre Pretto Nunes <anunes@thoughtworks.com> | 2014-12-01 17:23:51 -0200 |
---|---|---|
committer | Alexandre Pretto Nunes <anunes@thoughtworks.com> | 2014-12-03 15:52:05 -0200 |
commit | f86475751520c8fde47b67bd01b80bb193e9a54a (patch) | |
tree | 11facabc94fd814498bd72b235410aadc471d22e /web-ui/test/spec | |
parent | 9e53c0ddcdd5cd74cda0e9cb6cb05183adbe579c (diff) |
#135 Have the web-ui use the information sent by the service regarding reply and reply-all
Diffstat (limited to 'web-ui/test/spec')
-rw-r--r-- | web-ui/test/spec/services/model/mail.spec.js | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/web-ui/test/spec/services/model/mail.spec.js b/web-ui/test/spec/services/model/mail.spec.js index 3ee936f6..2cbd21e9 100644 --- a/web-ui/test/spec/services/model/mail.spec.js +++ b/web-ui/test/spec/services/model/mail.spec.js @@ -2,23 +2,8 @@ require(['services/model/mail'], function (Mail) { 'use strict'; - var testData; describe('services/model/mail', function () { - describe('reply addresses', function () { - it('returns the "to" and "cc" addresses if the mail was sent', function () { - var mail = Mail.create({ - header: { to: ['a@b.c', 'e@f.g'], cc: ['x@x.x'] }, - tags: [], - mailbox: 'SENT' - }); - - var addresses = mail.replyToAddress(); - - expect(addresses).toEqual({ to: ['a@b.c', 'e@f.g'], cc: ['x@x.x']}); - }); - }); - describe('parsing', function () { describe('a single email', function () { var sentMail, draftMail, recievedMail, recievedMailWithCC, rawMailWithMultipleTo; @@ -42,31 +27,6 @@ require(['services/model/mail'], function (Mail) { expect(recievedMail.isSentMail()).toBe(false); expect(recievedMail.isDraftMail()).toBe(false); }); - - it('reply to of a sent mail should be original recipient', function () { - expect(sentMail.replyToAddress()).toEqual({to: ['mariane_dach@davis.info'], cc: ['duda@la.lu']}); - }); - - it('reply to of a mail should be the reply_to field if existent', function () { - expect(recievedMail.replyToAddress()).toEqual({to: ['afton_braun@botsford.biz'], cc: [] }); - }); - - it('reply to of a mail should be the from field if no reply_to present', function () { - expect(recievedMailWithCC.replyToAddress()).toEqual({to: ['cleve_jaskolski@schimmelhirthe.net'], cc: []}); - }); - - it('reply to all should include all email addresses in the header', function () { - expect(recievedMailWithCC.replyToAllAddress()).toEqual({ - to: ['cleve_jaskolski@schimmelhirthe.net'], - cc: ['mariane_dach@davis.info'] - }); - }); - it('reply to all should include all email addresses in the header even for multiple to addresses', function () { - expect(rawMailWithMultipleTo.replyToAllAddress()).toEqual({ - to: ['cleve_jaskolski@schimmelhirthe.net', 'someoneelse@some-other-domain.tld'], - cc: ['mariane_dach@davis.info'] - }); - }); }); describe('multipart email', function () { |