diff --git a/cake/tests/cases/libs/model/model_write.test.php b/cake/tests/cases/libs/model/model_write.test.php index c71afb69f..03b8d9c84 100644 --- a/cake/tests/cases/libs/model/model_write.test.php +++ b/cake/tests/cases/libs/model/model_write.test.php @@ -2245,6 +2245,27 @@ class ModelWriteTest extends BaseModelTest { $this->assertTrue($result); } +/** + * test updating records and saving blank values. + * + * @return void + */ + function testUpdateSavingBlankValues() { + $this->loadFixtures('Article'); + $Article =& new Article(); + $Article->validate = array(); + $Article->create(); + $result = $Article->save(array( + 'id' => 1, + 'title' => '', + 'body' => '' + )); + $this->assertTrue($result); + $result = $Article->find('first', array('conditions' => array('Article.id' => 1))); + $this->assertEqual('', $result['Article']['title'], 'Title is not blank'); + $this->assertEqual('', $result['Article']['body'], 'Body is not blank'); + } + /** * testUpdateMultiple method *