* [unittest] modify unittest.

This commit is contained in:
sunguangming
2025-08-20 00:55:29 +00:00
parent 89e818cb9e
commit 306670e7dc
2 changed files with 8 additions and 4 deletions
+7 -3
View File
@@ -14,6 +14,7 @@ timeout=0
cid=1
- 正常传入的情况 @12
- 不传objectType第markdown条的title属性 @admin创建了发布
- 不传objectType @0
- 不传actionType @0
- 不传actionID @0
@@ -45,6 +46,9 @@ $result3 = $webhook->buildDataTest($objectType[0], $objectID[0], $actionType[1],
$result4 = $webhook->buildDataTest($objectType[0], $objectID[0], $actionType[0], $actionID[1]);
r(strpos($result1, 'markdown')) && p() && e('12'); //正常传入的情况
r($result2) && p() && e('0'); //不传objectType
r($result3) && p() && e('0'); //不传actionType
r($result4) && p() && e('0'); //不传actionID
$result1 = json_decode($result1, true);
r($result1) && p('markdown:title') && e('admin创建了发布'); //不传objectType
r($result2) && p() && e('0'); //不传objectType
r($result3) && p() && e('0'); //不传actionType
r($result4) && p() && e('0'); //不传actionID
+1 -1
View File
@@ -42,7 +42,7 @@ $result4 = $webhook->getBindAccountTest(1, 'webhook', 10);
$result5 = $webhook->getBindAccountTest(1, 'gitea', 3);
r($result1) && p() && e('user3'); //按条件查出openID=1的关联用户
r($result2) && p() && e('0'); //按条件查出openID=空时,关联的用户
r($result2) && p() && e('0'); //按条件查出openID=空时,关联的用户
r($result3) && p() && e('user10'); //按条件查出openID=8的关联用户
r($result4) && p() && e('user12'); //按条件查出openID=10的关联用户
r($result5) && p() && e('user5'); //按条件查出openID=3的关联用户