diff options
author | Louise Crow <louise.crow@gmail.com> | 2013-01-07 12:00:30 +0000 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2013-01-07 12:00:30 +0000 |
commit | 332ba3d93c57975f7901eceec2a8ab280d0dde9f (patch) | |
tree | 6362468e023ce89e5fb6b7713320b7fa1b9b09cb /spec/models/incoming_message_spec.rb | |
parent | 185c09f98dc670881239ecd230e47fb2f214e53b (diff) |
Handle case where info request doesn't have a user_name
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 6fc0ff3cc..f53a5856a 100644 --- a/spec/models/incoming_message_spec.rb +++ b/spec/models/incoming_message_spec.rb @@ -148,6 +148,13 @@ describe IncomingMessage, " folding quoted parts of emails" do @incoming_message.remove_lotus_quoting(text).should match(/FOLDED_QUOTED_SECTION/) end + it 'should not error when trying to fold lotus notes quoted parts on a request with no user_name' do + text = "hello" + @incoming_message = IncomingMessage.new() + @incoming_message.stub_chain(:info_request, :user_name).and_return(nil) + @incoming_message.remove_lotus_quoting(text).should == 'hello' + 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") |