* Do not delete cases when delete the testsuite. bug #46744.
This commit is contained in:
@@ -270,7 +270,7 @@ class testsuite extends control
|
||||
/* Check user access rights. */
|
||||
$this->testsuiteZen->checkTestsuiteAccess($suiteID);
|
||||
|
||||
$this->testsuite->deleteSuiteByID($suiteID);
|
||||
$this->testsuite->delete(TABLE_TESTSUITE, $suiteID);
|
||||
$message = $this->executeHooks($suiteID) ? : '';
|
||||
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(__FILE__, 5) . '/test/lib/init.php';
|
||||
include dirname(__FILE__, 2) . '/testsuite.class.php';
|
||||
su('admin');
|
||||
|
||||
zdTable('testsuite')->gen(1);
|
||||
|
||||
/**
|
||||
|
||||
title=测试 testsuiteModel->deleteSuiteByID();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
检查id为1的套件是否存在 >> 1:0
|
||||
测试suiteID值为1 >> 1
|
||||
检查id为1的套件是否存在2 >> 1:1
|
||||
|
||||
*/
|
||||
$suiteID = 1;
|
||||
|
||||
$testsuite = new testsuiteTest();
|
||||
|
||||
r($testsuite->getByIdTest($suiteID)) && p('id;deleted') && e('1;0'); //检查id为1的套件是否存在
|
||||
r($testsuite->deleteSuiteByIDTest($suiteID)) && p('') && e('1'); //测试suiteID值为1
|
||||
r($testsuite->getByIdTest($suiteID)) && p('id;deleted') && e('1;1'); //检查id为1的套件是否存在2
|
||||
@@ -234,23 +234,6 @@ class testsuiteTest
|
||||
return $objects;
|
||||
}
|
||||
|
||||
/**
|
||||
* Test delete suite and library.
|
||||
*
|
||||
* @param int $suiteID
|
||||
* @param string $table
|
||||
* @access public
|
||||
* @return int
|
||||
*/
|
||||
public function deleteSuiteByIDTest($suiteID, $table = '')
|
||||
{
|
||||
$objects = $this->objectModel->deleteSuiteByID($suiteID, $table);
|
||||
|
||||
if(dao::isError()) return dao::getError();
|
||||
|
||||
return $objects;
|
||||
}
|
||||
|
||||
/**
|
||||
* 测试判断操作是否可以点击。
|
||||
* Test judge an action is clickable or not.
|
||||
|
||||
Reference in New Issue
Block a user