diff options
author | Robin Houston <robin@lenny.robin> | 2011-07-29 05:09:48 +0100 |
---|---|---|
committer | Robin Houston <robin@lenny.robin> | 2011-07-29 05:09:48 +0100 |
commit | 62f863d6fbae6dc4922964b2530f151883ca2180 (patch) | |
tree | 8f0d431920357a233ca94bcbd2a44b1113330055 /spec/models/outgoing_mailer_spec.rb | |
parent | 642a3f74b7036383dd326584e411f98eb463cc0c (diff) | |
parent | 3ba811a9e576a50123930ccccda4dc01d5e3341e (diff) |
Merge branch 'master' into wdtk
Diffstat (limited to 'spec/models/outgoing_mailer_spec.rb')
-rw-r--r-- | spec/models/outgoing_mailer_spec.rb | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/spec/models/outgoing_mailer_spec.rb b/spec/models/outgoing_mailer_spec.rb index 3073c5ffd..d7587cb41 100644 --- a/spec/models/outgoing_mailer_spec.rb +++ b/spec/models/outgoing_mailer_spec.rb @@ -5,6 +5,9 @@ describe OutgoingMailer, " when working out follow up addresses" do # calls TMail. XXX untangle it and make these tests spread out and using # mocks. Put parts of the tests in spec/lib/tmail_extensions.rb fixtures :info_requests, :incoming_messages, :raw_emails, :public_bodies, :public_body_translations + before(:each) do + load_raw_emails_data(raw_emails) + end it "should parse them right" do ir = info_requests(:fancy_dog_request) @@ -67,8 +70,12 @@ describe OutgoingMailer, " when working out follow up addresses" do end describe OutgoingMailer, "when working out follow up subjects" do - fixtures :info_requests, :incoming_messages, :outgoing_messages - + fixtures :info_requests, :incoming_messages, :outgoing_messages, :raw_emails + + before(:each) do + load_raw_emails_data(raw_emails) + end + it "should prefix the title with 'Freedom of Information request -' for initial requests" do ir = info_requests(:fancy_dog_request) im = ir.incoming_messages[0] @@ -105,6 +112,7 @@ describe OutgoingMailer, "when working out follow up subjects" do it "should not add Re: prefix if there already is a lower case re: prefix" do ir = info_requests(:fancy_dog_request) im = ir.incoming_messages[0] + puts im.raw_email.data om = outgoing_messages(:useless_outgoing_message) om.incoming_message_followup = im |