* Finish task#54463.

This commit is contained in:
xieqiyu
2022-05-20 12:37:26 +08:00
parent 3c59f5c4a0
commit c07f0dbdab
3 changed files with 24 additions and 0 deletions
+22
View File
@@ -39,6 +39,17 @@ class testcaseModel extends model
*/
function create($bugID)
{
$steps = $this->post->steps;
$expects = $this->post->expects;
foreach($expects as $key => $value)
{
if(empty($steps[$key]))
{
dao::$errors[] = sprintf($this->lang->testcase->stepsEmpty, $key);
return false;
}
}
$now = helper::now();
$status = $this->getStatus('create');
$case = fixer::input('post')
@@ -705,6 +716,17 @@ class testcaseModel extends model
*/
public function update($caseID, $testtasks = array())
{
$steps = $this->post->steps;
$expects = $this->post->expects;
foreach($expects as $key => $value)
{
if(empty($steps[$key]))
{
dao::$errors[] = sprintf($this->lang->testcase->stepsEmpty, $key);
return false;
}
}
$now = helper::now();
$oldCase = $this->getById($caseID);