aboutsummaryrefslogtreecommitdiffstats
path: root/spec/models/info_request_event_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/models/info_request_event_spec.rb')
-rw-r--r--spec/models/info_request_event_spec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/models/info_request_event_spec.rb b/spec/models/info_request_event_spec.rb
index 5423b8da8..a75f4b232 100644
--- a/spec/models/info_request_event_spec.rb
+++ b/spec/models/info_request_event_spec.rb
@@ -73,6 +73,14 @@ describe InfoRequestEvent do
event.search_text_main.strip.should == "No way! I'm not going to tell you that in a month of Thursdays.\n\nThe Geraldine Quango"
end
+ it 'should get clipped text for incoming messages, and cache it too' do
+ event = info_request_events(:useless_incoming_message_event)
+
+ event.incoming_message_selective_columns("cached_main_body_text_folded").cached_main_body_text_folded = nil
+ event.search_text_main(true).strip.should == "No way! I'm not going to tell you that in a month of Thursdays.\n\nThe Geraldine Quango"
+ event.incoming_message_selective_columns("cached_main_body_text_folded").cached_main_body_text_folded.should_not == nil
+ end
+
end