* Modify test case.
This commit is contained in:
@@ -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];
|
||||
}
|
||||
|
||||
@@ -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查询群组
|
||||
|
||||
Reference in New Issue
Block a user