diff --git a/test/class/repo.class.php b/test/class/repo.class.php index c8acfe550e..f883ab0e73 100644 --- a/test/class/repo.class.php +++ b/test/class/repo.class.php @@ -68,10 +68,9 @@ class repoTest public function createTest($list) { - $create = array(); - $getCreate = array('SCM' => '', 'serviceHost' => '', 'serviceProject' => '', 'name' => '', 'path' => '', 'encoding' => '', 'client' => '', 'account' => '', 'password' => '', 'encrypt' => '', 'desc' => '', 'uid' => ''); + $init = array('SCM' => '', 'serviceHost' => '', 'serviceProject' => '', 'name' => '', 'path' => '', 'encoding' => '', 'client' => '', 'account' => '', 'password' => '', 'encrypt' => '', 'desc' => '', 'uid' => ''); - foreach($getCreate as $filed => $defaultvalue) $_POST[$filed] = $defaultvalue; + foreach($init as $filed => $defaultvalue) $_POST[$filed] = $defaultvalue; foreach($list as $key => $value) $_POST[$key] = $value; $objects = $this->objectModel->create(); diff --git a/test/model/repo/checkpriv.php b/test/model/repo/checkpriv.php index a7a980c74b..5311237ab7 100755 --- a/test/model/repo/checkpriv.php +++ b/test/model/repo/checkpriv.php @@ -10,7 +10,7 @@ title=测试 repoModel->checkPriv(); cid=1 pid=1 - >> 0 +检查用户权限,返回布尔值 >> 0 */ @@ -22,4 +22,4 @@ $repo->acl->user = 'admin'; $result = $checkPriv->checkPrivTest($repo); -r($result) && p($result) && e('0'); \ No newline at end of file +r($result) && p($result) && e('0'); //检查用户权限,返回布尔值 \ No newline at end of file diff --git a/test/model/repo/create.php b/test/model/repo/create.php index bc42977edc..2e3b0a84c0 100755 --- a/test/model/repo/create.php +++ b/test/model/repo/create.php @@ -10,9 +10,9 @@ title=测试 repoModel->create(); cid=1 pid=1 - >> 1 - >> 『名称』已经有『jktest』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。 - >> 因为安全原因,需要检测客户端版本,请将版本号写入文件 +正常创建gitlab版本库 >> 1 +当已有版本库时提示已有记录 >> 『名称』已经有『jktest』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。 +当数据类型为Gitea时提示写版本号 >> 因为安全原因,需要检测客户端版本,请将版本号写入文件 */ @@ -53,6 +53,8 @@ $resultOne = $repo->createTest($list); $resultTwo = $repo->createTest($list); $resultThree = $repo->createTest($listOne); -r($resultOne) && p($resultOne) && e('1'); -r($resultTwo) && p('name:0') && e('『名称』已经有『jktest』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。'); -r($resultThree) && p($resultThree) && e('因为安全原因,需要检测客户端版本,请将版本号写入文件'); \ No newline at end of file +r($resultOne) && p($resultOne) && e('1'); //正常创建gitlab版本库 +r($resultTwo) && p('name:0') && e('『名称』已经有『jktest』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。'); //当已有版本库时提示已有记录 +r($resultThree) && p($resultThree) && e('因为安全原因,需要检测客户端版本,请将版本号写入文件'); //当数据类型为Gitea时提示写版本号 + +$db->restoreDB(); \ No newline at end of file