Skip to content
Permalink
Browse files

Adding test to disprove #385. Proves saveAll with validate => first b…

…ehaves correctly.
  • Loading branch information...
markstory committed Dec 4, 2009
1 parent be64f26 commit cc750d15f1b41976b496d23d41a836c2becb6154
Showing with 13 additions and 0 deletions.
  1. +13 −0 cake/tests/cases/libs/model/model_write.test.php
@@ -3067,6 +3067,19 @@ function testSaveAllHasOne() {
'attachment' => 'some_file.zip'
)));
$this->assertEqual($result, $expected);
$model->Attachment->bindModel(array('belongsTo' => array('Comment')), false);
$data = array(
'Comment' => array(
'comment' => 'Comment with attachment',
'article_id' => 1,
'user_id' => 1
),
'Attachment' => array(
'attachment' => 'some_file.zip'
));
$this->assertTrue($model->saveAll($data, array('validate' => 'first')));
}
/**
* testSaveAllBelongsTo method

0 comments on commit cc750d1

Please sign in to comment.
You can’t perform that action at this time.