aboutsummaryrefslogtreecommitdiffstats
path: root/spec/models/info_request_event_spec.rb
diff options
context:
space:
mode:
authorSeb Bacon <seb.bacon@gmail.com>2012-01-12 13:22:59 +0000
committerSeb Bacon <seb.bacon@gmail.com>2012-01-12 13:22:59 +0000
commitb963d8c5ab50aee332f6d67a92508390a15163cc (patch)
treefebbc85663049e0ef843bc2ccbdb19fb76368950 /spec/models/info_request_event_spec.rb
parent0440a663aef77c4a4bbcd96d506748a09057757a (diff)
Changes to make normal search pages not necessarily load info_request_events every time
Diffstat (limited to 'spec/models/info_request_event_spec.rb')
-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