aboutsummaryrefslogtreecommitdiffstats
path: root/spec/models/incoming_message_spec.rb
diff options
context:
space:
mode:
authorMatthew Landauer <matthew@openaustralia.org>2013-01-25 15:12:16 +1100
committerMatthew Landauer <matthew@openaustralia.org>2013-01-25 15:12:16 +1100
commit4e74f0fcdcb0820865689cc0595cf0c83aee7cab (patch)
tree1fd4a83516acaad73d88f0d7f011caf045ab5a17 /spec/models/incoming_message_spec.rb
parent65680320bee44812394041492c8492e95b1a3d78 (diff)
parenta67666e34c280d2b9eb613f57d96ba4ee5fcd749 (diff)
Merge branch 'rails_xss' into rails-3-spike
Conflicts: Gemfile Gemfile.lock config/environment.rb lib/i18n_fixes.rb
Diffstat (limited to 'spec/models/incoming_message_spec.rb')
-rw-r--r--spec/models/incoming_message_spec.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/models/incoming_message_spec.rb b/spec/models/incoming_message_spec.rb
index e327c2444..781212841 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")