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
This commit is contained in:
nate 2008-03-01 03:31:11 +00:00
parent e58c397bc9
commit affcdd23dc

View file

@ -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);
}