Permalink
Browse files

Adding test to show correct functioning of containable + field() + re…

…cursive = -1. Closes #409
  • Loading branch information...
1 parent a5f0197 commit 6600c92cd3c061c4d37792727fd0372a737c1b47 @markstory markstory committed Apr 20, 2010
Showing with 11 additions and 0 deletions.
  1. +11 −0 cake/tests/cases/libs/model/behaviors/containable.test.php
@@ -3607,6 +3607,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
*
* @param mixed $Model

0 comments on commit 6600c92

Please sign in to comment.