Permalink
Browse files

Adding a test for containable modifying return. Refs #1219

  • Loading branch information...
markstory committed Oct 27, 2010
1 parent 9f2d33a commit 3639f5211770e6b75a096fc02ca19470511611b3
Showing with 13 additions and 0 deletions.
  1. +13 −0 cake/tests/cases/libs/model/behaviors/containable.test.php
@@ -3637,6 +3637,19 @@ function testAutoFieldsWithRecursiveNegativeOne() {
$this->assertNoErrors();
$this->assertEqual($result, 'First Article', 'Field is wrong');
}
+
+/**
+ * test that find(all) doesn't return incorrect values when mixed with containable.
+ *
+ * @return void
+ */
+ function testFindAllReturn() {
+ $result = $this->Article->find('all', array(
+ 'conditions' => array('Article.id' => 999999999)
+ ));
+ $this->assertEqual($result, array(), 'Should be empty.');
+ }
+
/**
* containments method
*

0 comments on commit 3639f52

Please sign in to comment.