Skip to content

Commit

Permalink
Adding test to show correct functioning of containable + field() + re…
Browse files Browse the repository at this point in the history
…cursive = -1. Closes #409
  • Loading branch information
markstory committed Apr 20, 2010
1 parent a5f0197 commit 6600c92
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions cake/tests/cases/libs/model/behaviors/containable.test.php
Expand Up @@ -3606,6 +3606,17 @@ function testAutoFieldsWithMultipleDatabases() {

$this->_fixtures[$this->_fixtureClassMap['User']]->drop($db);
}
/**
* test that autoFields doesn't splice in columns that aren't part of the join.
*
* @return void
*/
function testAutoFieldsWithRecursiveNegativeOne() {
$this->Article->recursive = -1;
$result = $this->Article->field('title', array('Article.title' => 'First Article'));
$this->assertNoErrors();
$this->assertEqual($result, 'First Article', 'Field is wrong');
}
/**
* containments method
*
Expand Down

0 comments on commit 6600c92

Please sign in to comment.