* Adjust codes.

This commit is contained in:
caoyanyi
2022-08-08 12:12:41 +08:00
parent 60492e05bb
commit 523a5f5d9b
3 changed files with 12 additions and 12 deletions
+3 -3
View File
@@ -20,9 +20,9 @@ Gitea名称为空 >> name
$gitea = new giteaTest();
$_POST = array();
$_POST['name'] = '';
$_POST['url'] = 'http://10.0.7.242:9020';
$_POST['token'] = 'c6769e6761a7d719129b2421dcb3112d936e2b1f';
$_POST['name'] = '';
$_POST['url'] = 'http://10.0.7.242:9020';
$_POST['token'] = 'c6769e6761a7d719129b2421dcb3112d936e2b1f';
r($gitea->create()) && p() && e('name'); // Gitea名称为空
+3 -3
View File
@@ -11,9 +11,9 @@ title=测试giteaModel->gitById();
cid=1
pid=1
使用存在的ID >> 4
使用空的ID >> 0
使用不存在的ID >> 0
使用存在的ID >> 4
使用空的ID >> 0
使用不存在的ID >> 0
*/
+6 -6
View File
@@ -12,7 +12,7 @@ cid=1
pid=1
Gitea名称为空 >> name
服务器地址为空 >> url
服务器地址为空 >> url
正确Gitea数据 >> Changed Gitea
*/
@@ -22,14 +22,14 @@ $gitea = new giteaTest();
$giteaID = 3;
$_POST = array();
$_POST['name'] = '';
$_POST['url'] = 'http://10.0.7.242:9020';
$_POST['token'] = 'c6769e6761a7d719129b2421dcb3112d936e2b1f';
$_POST['name'] = '';
$_POST['url'] = 'http://10.0.7.242:9020';
$_POST['token'] = 'c6769e6761a7d719129b2421dcb3112d936e2b1f';
r($gitea->update($giteaID)) && p() && e('name'); // Gitea名称为空
$_POST['name'] = 'Changed Gitea';
$_POST['url'] = '';
$_POST['name'] = 'Changed Gitea';
$_POST['url'] = '';
r($gitea->update($giteaID)) && p() && e('url'); // 服务器地址为空
$_POST['url'] = 'http://10.0.1.161:58080';