Add unit test

This commit is contained in:
Christian Winther 2013-05-28 12:02:58 +00:00
parent 9e6120c86a
commit ef8603e1a7

View file

@ -7943,6 +7943,27 @@ class ModelReadTest extends BaseModelTest {
$this->assertTrue(is_array($result) && !empty($result));
}
/**
* test to assert that != in key together with a single element array will work
*
* @return void
*/
public function testNotEqualsInArrayWithOneValue() {
$this->loadFixtures('Article');
$Article = new Article();
$Article->recursive = -1;
$result = $Article->find(
'all',
array(
'conditions' => array(
'Article.id !=' => array(1)
)
)
);
$this->assertTrue(is_array($result) && !empty($result));
}
/**
* test custom find method
*