From f273d6938e14e867850adcb60b48e9b20c696b61 Mon Sep 17 00:00:00 2001 From: Sarah Mei Date: Sun, 9 Jan 2011 20:44:23 -0800 Subject: [PATCH] Fix pagination spec - we don't care which 25 things are returned, just that 25 are returned. --- spec/controllers/notifications_controller_spec.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/spec/controllers/notifications_controller_spec.rb b/spec/controllers/notifications_controller_spec.rb index 438451905..4adcca5a6 100644 --- a/spec/controllers/notifications_controller_spec.rb +++ b/spec/controllers/notifications_controller_spec.rb @@ -11,7 +11,6 @@ describe NotificationsController do before do sign_in :user, user - end describe '#update' do @@ -40,10 +39,10 @@ describe NotificationsController do end get :index - assigns[:notifications].should =~ Notification.all(:user_id => user.id, :limit => 25) + assigns[:notifications].count.should == 25 get :index, :page => 2 - assigns[:notifications].should =~ Notification.all(:user_id => user.id, :offset => 25, :limit => 25) + assigns[:notifications].count.should == 10 end end end