diff options
author | Louise Crow <louise.crow@gmail.com> | 2012-10-24 16:49:21 +0100 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2012-10-24 16:49:21 +0100 |
commit | 0860cd563f6fa904b80c2ec01e42e4a0d891ba33 (patch) | |
tree | b86edea079d90e13383d5f5626039a72c8bc0772 /spec/models/incoming_message_spec.rb | |
parent | 7cb0812d212475c53b0175f832bb7ffe33de1749 (diff) | |
parent | 5ad0dcc660b1fdb8e8625b41950547aa7f6c5c49 (diff) |
Merge branch 'feature/ruby-19-compat-immediate' into develop
Conflicts:
Gemfile.lock
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 |