Browse Source

Add tests for setting the default model

Jose Diaz-Gonzalez 10 years ago
parent
commit
3305f34ac3
1 changed files with 6 additions and 0 deletions
  1. 6 0
      tests/TestCase/View/Helper/PaginatorHelperTest.php

+ 6 - 0
tests/TestCase/View/Helper/PaginatorHelperTest.php

@@ -2253,6 +2253,12 @@ class PaginatorHelperTest extends TestCase
     {
         $this->Paginator->request = new Request();
         $this->assertNull($this->Paginator->defaultModel());
+
+        $this->Paginator->defaultModel('Article');
+        $this->assertEquals('Article', $this->Paginator->defaultModel());
+
+        $this->Paginator->options(['model' => 'Client']);
+        $this->assertEquals('Client', $this->Paginator->defaultModel());
     }
 
     /**