From eaf7fcd7fe6ee37f8e6786d01cdddf9d1817758e Mon Sep 17 00:00:00 2001 From: Dan Hansen Date: Tue, 28 Jun 2011 23:31:34 -0700 Subject: [PATCH] speed up notifications controller index spec --- spec/controllers/notifications_controller_spec.rb | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/spec/controllers/notifications_controller_spec.rb b/spec/controllers/notifications_controller_spec.rb index 696dce9cc..524edeac5 100644 --- a/spec/controllers/notifications_controller_spec.rb +++ b/spec/controllers/notifications_controller_spec.rb @@ -47,15 +47,18 @@ describe NotificationsController do describe '#index' do before do @post = Factory(:status_message) - 26.times do - Factory(:notification, :recipient => @user, :target => @post) - end + Factory(:notification, :recipient => @user, :target => @post) end it 'paginates the notifications' do + 25.times do + Factory(:notification, :recipient => @user, :target => @post) + end + @controller.index({})[:notifications].count.should == 25 @controller.index(:page => 2)[:notifications].count.should == 1 end + it "includes the actors" do notification = Factory(:notification, :recipient => @user, :target => @post) response = @controller.index({})