diff options
author | Seb Bacon <seb.bacon@gmail.com> | 2012-01-19 14:36:06 +0000 |
---|---|---|
committer | Seb Bacon <seb.bacon@gmail.com> | 2012-01-19 14:36:06 +0000 |
commit | f4e16a6a5fd363c145a26e91bdf8d87821772f80 (patch) | |
tree | 90a082067f7705d8ad0b5dafba503be85c1716d4 /spec/models/outgoing_mailer_spec.rb | |
parent | 63c5ed67bf023852b121993d0fc7ce62e0be1023 (diff) | |
parent | b2618cc78e86176c13e2b4197d56270242680884 (diff) |
Merge branch 'wdtk' of github.com:sebbacon/alaveteli into wdtk
Diffstat (limited to 'spec/models/outgoing_mailer_spec.rb')
-rw-r--r-- | spec/models/outgoing_mailer_spec.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/models/outgoing_mailer_spec.rb b/spec/models/outgoing_mailer_spec.rb index 75c8053b4..c5fde93fc 100644 --- a/spec/models/outgoing_mailer_spec.rb +++ b/spec/models/outgoing_mailer_spec.rb @@ -24,6 +24,7 @@ describe OutgoingMailer, " when working out follow up addresses" do im = ir.incoming_messages[0] im.raw_email.data = im.raw_email.data.sub("\"FOI Person\" <foiperson@localhost>", "foiperson@localhost") + im.parse_raw_email! true # check the basic entry in the fixture is fine OutgoingMailer.name_and_email_for_followup(ir, im).should == "foiperson@localhost" @@ -36,6 +37,7 @@ describe OutgoingMailer, " when working out follow up addresses" do im = ir.incoming_messages[0] im.raw_email.data = im.raw_email.data.sub("FOI Person", "FOI [ Person") + im.parse_raw_email! true # check the basic entry in the fixture is fine OutgoingMailer.name_and_email_for_followup(ir, im).should == "\"FOI [ Person\" <foiperson@localhost>" @@ -48,6 +50,7 @@ describe OutgoingMailer, " when working out follow up addresses" do im = ir.incoming_messages[0] im.raw_email.data = im.raw_email.data.sub("FOI Person", "FOI \\\" Person") + im.parse_raw_email! true # check the basic entry in the fixture is fine OutgoingMailer.name_and_email_for_followup(ir, im).should == "\"FOI \\\" Person\" <foiperson@localhost>" @@ -60,6 +63,7 @@ describe OutgoingMailer, " when working out follow up addresses" do im = ir.incoming_messages[0] im.raw_email.data = im.raw_email.data.sub("FOI Person", "FOI @ Person") + im.parse_raw_email! true # check the basic entry in the fixture is fine OutgoingMailer.name_and_email_for_followup(ir, im).should == "\"FOI @ Person\" <foiperson@localhost>" @@ -116,6 +120,8 @@ describe OutgoingMailer, "when working out follow up subjects" do om.incoming_message_followup = im im.raw_email.data = im.raw_email.data.sub("Subject: Geraldine FOI Code AZXB421", "Subject: re: Geraldine FOI Code AZXB421") + im.parse_raw_email! true + OutgoingMailer.subject_for_followup(ir, om).should == "re: Geraldine FOI Code AZXB421" end @@ -127,6 +133,8 @@ describe OutgoingMailer, "when working out follow up subjects" do im.raw_email.data = im.raw_email.data.sub("foiperson@localhost", "postmaster@localhost") im.raw_email.data = im.raw_email.data.sub("Subject: Geraldine FOI Code AZXB421", "Subject: Delivery Failed") + im.parse_raw_email! true + OutgoingMailer.subject_for_followup(ir, om).should == "Re: Freedom of Information request - Why do you have & such a fancy dog?" end end |