diff options
author | Louise Crow <louise.crow@gmail.com> | 2012-10-11 14:39:59 +0100 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2012-10-11 14:39:59 +0100 |
commit | dd0c8d32c423998ab24409f8b4cab338b089d9a4 (patch) | |
tree | 929879b95c648e5711b4a8fd78111d22c19944fe /spec/models/incoming_message_spec.rb | |
parent | a357a125317b97c13b53b55e3385fa75db458e13 (diff) |
Convert example url from comment into passing spec.
Diffstat (limited to 'spec/models/incoming_message_spec.rb')
-rw-r--r-- | spec/models/incoming_message_spec.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/models/incoming_message_spec.rb b/spec/models/incoming_message_spec.rb index b7b88db59..b95cc83c4 100644 --- a/spec/models/incoming_message_spec.rb +++ b/spec/models/incoming_message_spec.rb @@ -132,6 +132,13 @@ end describe IncomingMessage, " folding quoted parts of emails" do + it 'should fold a plain text lotus notes quoted part correctly' do + text = "FOI Team\n\n\nInfo Requester <xxx@whatdotheyknow.com>=20\nSent by: Info Requester <request-bounce-xxxxx@whatdotheyknow.com>\n06/03/08 10:00\nPlease respond to\nInfo Requester <request-xxxx@whatdotheyknow.com>" + @incoming_message = IncomingMessage.new() + @incoming_message.stub_chain(:info_request, :user_name).and_return("Info Requester") + @incoming_message.remove_lotus_quoting(text).should match(/FOLDED_QUOTED_SECTION/) + end + it "cope with [ in user names properly" do @incoming_message = IncomingMessage.new() @incoming_message.stub_chain(:info_request, :user_name).and_return("Sir [ Bobble") |