Skip to content

Commit

Permalink
Add test for saveMany + validate=false.
Browse files Browse the repository at this point in the history
Closes #2468
  • Loading branch information
markstory committed Dec 11, 2013
1 parent 2a58e52 commit 3b867a0
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions lib/Cake/Test/Case/Model/ModelWriteTest.php
Expand Up @@ -5027,6 +5027,23 @@ public function testSaveMany() {
$this->assertEquals($expected, $result);
}

/**
* Test SaveMany with validate=false.
*
* @return void
*/
public function testSaveManyValidateFalse() {
$this->loadFixtures('Post');
$TestModel = new Post();
$TestModel->deleteAll(true);
$data = array(
array('id' => 1, 'author_id' => 1, 'title' => 'hi'),
array('id' => 2, 'author_id' => 1, 'title' => 'bye')
);
$result = $TestModel->saveAll($data, array('validate' => false));
$this->assertTrue($result);
}

/**
* Test SaveAssociated with Habtm relations
*
Expand Down

0 comments on commit 3b867a0

Please sign in to comment.