diff options
author | Seb Bacon <seb.bacon@gmail.com> | 2012-01-19 12:07:55 +0000 |
---|---|---|
committer | Seb Bacon <seb.bacon@gmail.com> | 2012-01-19 12:07:55 +0000 |
commit | 45e3ecda924473817a22e88b25b24fb770b5029c (patch) | |
tree | 5b9ca8f7c200e72e818f9ad91f6e1e7ef041e6d8 /spec/models | |
parent | 69a2ea41c7c723ba11690ee6ed148cda012f8358 (diff) |
Always show the right search snippet. Fixes #352.
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/info_request_event_spec.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/models/info_request_event_spec.rb b/spec/models/info_request_event_spec.rb index 5423b8da8..63c859007 100644 --- a/spec/models/info_request_event_spec.rb +++ b/spec/models/info_request_event_spec.rb @@ -73,6 +73,13 @@ 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.should == 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 |