* Modify test case.

This commit is contained in:
caoyanyi
2022-02-14 15:19:07 +08:00
parent bc643436ab
commit 7fc3b6d4e9
2 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -610,7 +610,7 @@ class gitlabModel extends model
{
$url .= '&owned=true';
}
elseif(!empty($minRole))
elseif(!empty($minRole) and isset($this->config->gitlab->accessLevel[$minRole]))
{
$url .= '&min_access_level=' . $this->config->gitlab->accessLevel[$minRole];
}
+5 -5
View File
@@ -21,22 +21,22 @@ if(!$result) $result = 'return null';
r($result) && p() && e('return null'); //使用空的数据查询群组
$gitlabID = 1;
$result = $gitlab->apiGetGroups($gitlabID, $orderBy, $minRole);
$result = $gitlab->apiGetGroups($gitlabID, $orderBy, $minRole);
if($result) $result = 'return true';
r($result) && p() && e('return true'); //使用正确的gitlabID查询群组
$orderBy = 'abc';
$result = $gitlab->apiGetGroups($gitlabID, $orderBy, $minRole);
$result = $gitlab->apiGetGroups($gitlabID, $orderBy, $minRole);
if(is_array($result)) $result = 'return true';
r($result) && p() && e('return true'); //使用错误的orderBy查询群组
$orderBy = 'name_asc';
$minRole = 'owner';
$result = $gitlab->apiGetGroups($gitlabID, $orderBy, $minRole);
$result = $gitlab->apiGetGroups($gitlabID, $orderBy, $minRole);
if(is_array($result)) $result = 'return true';
r($result) && p() && e('return true'); //通过gitlabID,orderBy查询群组
$minRole = 'abc';
$result = $gitlab->apiGetGroups($gitlabID, $orderBy, $minRole);
if(is_array($result) && empty($result)) $result = 'return true';
$result = $gitlab->apiGetGroups($gitlabID, $orderBy, $minRole);
if(is_array($result)) $result = 'return true';
r($result) && p() && e('return true'); //通过错误的minRole查询群组