* Fix bug #26743. And modify the unit case of batch edit under the execution module.
This commit is contained in:
@@ -785,6 +785,9 @@ class executionModel extends model
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Replace the project language item for message. */
|
||||
$this->lang->project->name = $this->lang->execution->name;
|
||||
$this->lang->project->code = $this->lang->execution->code;
|
||||
$this->dao->update(TABLE_EXECUTION)->data($execution)
|
||||
->autoCheck($skipFields = 'begin,end')
|
||||
->batchcheck($this->config->execution->edit->requiredFields, 'notempty')
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
$config->test = new stdclass;
|
||||
$config->test->dbPrefix = "db_";
|
||||
$config->test->rawDB = 'zentaounittest';
|
||||
$config->test->rawDB = 'zentaounit';
|
||||
$config->test->dbNum = 10;
|
||||
|
||||
@@ -12,7 +12,7 @@ cid=1
|
||||
pid=1
|
||||
|
||||
测试批量修改任务 >> name,迭代1,批量修改执行一
|
||||
测试name为空 >> 『name』不能为空。
|
||||
测试name为空 >> 『迭代名称』不能为空。
|
||||
|
||||
*/
|
||||
|
||||
@@ -30,5 +30,5 @@ $noName = array('statuses'=> $statuses, 'codes' => $code, 'PMs' => $pms, 'lifet
|
||||
|
||||
$execution = new executionTest();
|
||||
r($execution->batchUpdateObject($normal, $executionID)) && p('0:field,old,new') && e('name,迭代1,批量修改执行一'); // 测试批量修改任务
|
||||
r($execution->batchUpdateObject($noName, $executionID)) && p() && e('『name』不能为空。'); // 测试name为空
|
||||
$db->restoreDB();
|
||||
r($execution->batchUpdateObject($noName, $executionID)) && p('name:0') && e('『迭代名称』不能为空。'); // 测试name为空
|
||||
$db->restoreDB();
|
||||
|
||||
Reference in New Issue
Block a user