summaryrefslogtreecommitdiff
path: root/web-ui/test/spec
diff options
context:
space:
mode:
authorLisa Junger <ljunger@thoughtworks.com>2014-10-24 17:37:44 +0200
committerAlexandre Pretto Nunes <anunes@thoughtworks.com>2014-12-03 15:47:21 -0200
commit6c5e6a65ed543193f676f601741fb597dc48e5dd (patch)
treec11576f32808289131a9816d5cb99dcdd424a2db /web-ui/test/spec
parentf7472aed29c525bc630fe1ea05833f840bc42dc4 (diff)
Don't use to address for reply all.
Diffstat (limited to 'web-ui/test/spec')
-rw-r--r--web-ui/test/spec/services/model/mail.spec.js11
1 files changed, 9 insertions, 2 deletions
diff --git a/web-ui/test/spec/services/model/mail.spec.js b/web-ui/test/spec/services/model/mail.spec.js
index 24a8d244..3ee936f6 100644
--- a/web-ui/test/spec/services/model/mail.spec.js
+++ b/web-ui/test/spec/services/model/mail.spec.js
@@ -21,12 +21,13 @@ require(['services/model/mail'], function (Mail) {
describe('parsing', function () {
describe('a single email', function () {
- var sentMail, draftMail, recievedMail, recievedMailWithCC;
+ var sentMail, draftMail, recievedMail, recievedMailWithCC, rawMailWithMultipleTo;
beforeEach(function () {
sentMail = Mail.create(Pixelated.testData().rawMail.sent);
draftMail = Mail.create(Pixelated.testData().rawMail.draft);
recievedMail = Mail.create(Pixelated.testData().rawMail.recieved);
recievedMailWithCC = Mail.create(Pixelated.testData().rawMail.recievedWithCC);
+ rawMailWithMultipleTo = Mail.create(Pixelated.testData().rawMail.rawMailWithMultipleTo);
});
it('correctly identifies a sent mail', function () {
@@ -56,7 +57,13 @@ require(['services/model/mail'], function (Mail) {
it('reply to all should include all email addresses in the header', function () {
expect(recievedMailWithCC.replyToAllAddress()).toEqual({
- to: ['cleve_jaskolski@schimmelhirthe.net', 'stanford@sipes.com'],
+ 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']
});
});