Permalink
Browse files

test added to show pagination conditions will not result in incorrect…

… count, refs #2736
ceeram committed Mar 30, 2012
1 parent eba0b1f commit 65f25ed910bf9a066157a3aab3edb15c15ce5ae9
Showing with 5 additions and 0 deletions.
  1. +5 −0 lib/Cake/Test/Case/Controller/Component/PaginatorComponentTest.php
@@ -331,6 +331,11 @@ public function testPaginate() {
$this->assertSame($Controller->params['paging']['PaginatorControllerPost']['pageCount'], 3);
$this->assertSame($Controller->params['paging']['PaginatorControllerPost']['prevPage'], false);
$this->assertSame($Controller->params['paging']['PaginatorControllerPost']['nextPage'], true);
+
+ $Controller->Paginator->settings = array('conditions' => array('PaginatorAuthor.user' => 'mariano'));
+ $Controller->Paginator->paginate('PaginatorControllerPost');
+
+ $this->assertSame(2, $Controller->params['paging']['PaginatorControllerPost']['count']);
}
/**

0 comments on commit 65f25ed

Please sign in to comment.