From affcdd23dc470f0134772ff1df9e75834db3dca0 Mon Sep 17 00:00:00 2001 From: nate Date: Sat, 1 Mar 2008 03:31:11 +0000 Subject: [PATCH] Updating tree test case to verify addition of whitelisted fields, fixes #4141 git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6494 3807eeeb-6ff5-0310-8944-8be069107fe0 --- cake/tests/cases/libs/model/behaviors/tree.test.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cake/tests/cases/libs/model/behaviors/tree.test.php b/cake/tests/cases/libs/model/behaviors/tree.test.php index 66e52666f..8b69a067b 100644 --- a/cake/tests/cases/libs/model/behaviors/tree.test.php +++ b/cake/tests/cases/libs/model/behaviors/tree.test.php @@ -314,9 +314,9 @@ class NumberTreeCase extends CakeTestCase { $this->NumberTree->whitelist = array('name', 'parent_id'); $this->NumberTree->save(array('NumberTree' => array('name' => 'testAddOrphan', 'parent_id' => null))); - $result = $this->NumberTree->find(null, array('name', 'parent_id'), 'NumberTree.lft desc'); - $expected = array('NumberTree' => array('name' => 'testAddOrphan', 'parent_id' => null)); - $this->assertEqual($result, $expected); + $result = $this->NumberTree->findByName('testAddOrphan', array('name', 'parent_id', 'lft', 'rght')); + $expected = array('name' => 'testAddOrphan', 'parent_id' => null, 'lft' => '15', 'rght' => 16); + $this->assertEqual($result['NumberTree'], $expected); $this->assertIdentical($this->NumberTree->verify(), true); }