Skip to content

Commit

Permalink
Adding test case for find(list) with recursive.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Jul 11, 2010
1 parent 6d87240 commit e382a1c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions cake/tests/cases/libs/model/model_read.test.php
Expand Up @@ -6408,6 +6408,18 @@ function testGenerateFindList() {
4 => 'garrett (CakePHP)'
);
$this->assertEqual($result, $expected);

$TestModel =& new Article();
$TestModel->displayField = 'title';
$result = $TestModel->find('list', array(
'conditions' => array('User.user' => 'mariano'),
'recursive' => 0
));
$expected = array(
1 => 'First Article',
3 => 'Third Article'
);
$this->assertEqual($result, $expected);
}

/**
Expand Down

0 comments on commit e382a1c

Please sign in to comment.