aboutsummaryrefslogtreecommitdiffstats
path: root/spec/models
diff options
context:
space:
mode:
authorSeb Bacon <seb.bacon@gmail.com>2012-01-13 13:48:03 +0000
committerSeb Bacon <seb.bacon@gmail.com>2012-01-13 13:48:35 +0000
commit4ee1933642ca2475e8248790c27d14e8f30fbe78 (patch)
tree3055b090521d6fa1638d223cdb99046542601ab8 /spec/models
parent22f5578255646864c5996e46a8e3f223cdb8aaea (diff)
parentb963d8c5ab50aee332f6d67a92508390a15163cc (diff)
Merge branch 'fast-search-hack' into wdtk. Addresses the second slow SQL example at issue #327, at least in part.
Diffstat (limited to 'spec/models')
-rw-r--r--spec/models/info_request_event_spec.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/spec/models/info_request_event_spec.rb b/spec/models/info_request_event_spec.rb
index 3229284cc..5423b8da8 100644
--- a/spec/models/info_request_event_spec.rb
+++ b/spec/models/info_request_event_spec.rb
@@ -29,7 +29,8 @@ describe InfoRequestEvent do
describe "should know" do
it "that it's an incoming message" do
- event = InfoRequestEvent.new(:incoming_message => mock_model(IncomingMessage))
+ event = InfoRequestEvent.new()
+ event.stub!(:incoming_message_selective_columns).and_return(1)
event.is_incoming_message?.should be_true
event.is_outgoing_message?.should be_false
event.is_comment?.should be_false
@@ -37,6 +38,7 @@ describe InfoRequestEvent do
it "that it's an outgoing message" do
event = InfoRequestEvent.new(:outgoing_message => mock_model(OutgoingMessage))
+ event.id = 1
event.is_incoming_message?.should be_false
event.is_outgoing_message?.should be_true
event.is_comment?.should be_false
@@ -44,6 +46,7 @@ describe InfoRequestEvent do
it "that it's a comment" do
event = InfoRequestEvent.new(:comment => mock_model(Comment))
+ event.id = 1
event.is_incoming_message?.should be_false
event.is_outgoing_message?.should be_false
event.is_comment?.should be_true