Add tests covering basic use of <> in deleteAll()

Refs #9253
This commit is contained in:
mark_story 2016-08-13 22:48:02 -04:00
parent a10bdb226a
commit 3e16f8911d

View file

@ -421,6 +421,20 @@ class ModelDeleteTest extends BaseModelTest {
$this->assertTrue($result, 'deleteAll returned false when all no records matched conditions. %s'); $this->assertTrue($result, 'deleteAll returned false when all no records matched conditions. %s');
} }
/**
* testDeleteAll diamond operator method
*
* @return void
*/
public function testDeleteAllDiamondOperator() {
$this->loadFixtures('Article');
$article = new Article();
$result = $article->deleteAll(array('Article.id <>' => 1));
$this->assertTrue($result);
$this->assertFalse($article->exists(2));
}
/** /**
* testDeleteAllUnknownColumn method * testDeleteAllUnknownColumn method
* *