diff options
Diffstat (limited to 'spec/models/incoming_message_spec.rb')
-rw-r--r-- | spec/models/incoming_message_spec.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/models/incoming_message_spec.rb b/spec/models/incoming_message_spec.rb index 69a5da0e9..b038c43d9 100644 --- a/spec/models/incoming_message_spec.rb +++ b/spec/models/incoming_message_spec.rb @@ -154,6 +154,23 @@ describe IncomingMessage, " folding quoted parts of emails" do text.should == "\n\nFOLDED_QUOTED_SECTION" end + it 'should fold an example of another kind of forward quoting' do + ir = info_requests(:fancy_dog_request) + receive_incoming_mail('forward-quoting-example.email', ir.incoming_email) + message = ir.incoming_messages[1] + message.get_main_body_text_folded.should match(/FOLDED_QUOTED_SECTION/) + end + + it 'should fold a further example of forward quoting' do + ir = info_requests(:fancy_dog_request) + receive_incoming_mail('forward-quoting-example-2.email', ir.incoming_email) + message = ir.incoming_messages[1] + body_text = message.get_main_body_text_folded + body_text.should match(/FOLDED_QUOTED_SECTION/) + # check that the quoted section incorporates both quoted messages + body_text.should_not match('Subject: RE: Freedom of Information request') + end + end describe IncomingMessage, " checking validity to reply to" do |