Fix pagination spec - we don't care which 25 things are returned, just that 25 are returned.
This commit is contained in:
parent
545fbe4679
commit
f273d6938e
1 changed files with 2 additions and 3 deletions
|
|
@ -11,7 +11,6 @@ describe NotificationsController do
|
||||||
|
|
||||||
before do
|
before do
|
||||||
sign_in :user, user
|
sign_in :user, user
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
describe '#update' do
|
describe '#update' do
|
||||||
|
|
@ -40,10 +39,10 @@ describe NotificationsController do
|
||||||
end
|
end
|
||||||
|
|
||||||
get :index
|
get :index
|
||||||
assigns[:notifications].should =~ Notification.all(:user_id => user.id, :limit => 25)
|
assigns[:notifications].count.should == 25
|
||||||
|
|
||||||
get :index, :page => 2
|
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
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue