diff --git a/test/class/group.class.php b/test/class/group.class.php old mode 100644 new mode 100755 index 535607502f..2f64bae404 --- a/test/class/group.class.php +++ b/test/class/group.class.php @@ -291,22 +291,6 @@ class groupTest return $objects; } - /** - * Update view priv. - * - * @param int $groupID - * @access public - * @return bool - */ - public function updateViewTest($groupID) - { - $objects = $this->objectModel->updateView($groupID); - - if(dao::isError()) return dao::getError(); - - return $objects; - } - /** * Update privilege by module. * diff --git a/test/model/group/updateview.php b/test/model/group/updateview.php old mode 100644 new mode 100755 index 667b57cfa8..7e53c6d698 --- a/test/model/group/updateview.php +++ b/test/model/group/updateview.php @@ -1,7 +1,6 @@ #!/usr/bin/env php loadModel('group'); -r($group->updateViewTest()) && p() && e(); \ No newline at end of file +$_POST['allchecker'] = 1; +$tester->group->updateView(1); +$group1 = $tester->group->getByID(1); + +$_POST['actions']['task']['create'] = 'create'; +$tester->group->updateView(1); +$group2 = $tester->group->getByID(1); + +r(count($group1->acl)) && p() && e('2'); // 针对ID为1的权限分组,设置全选权限,查看返回的数据元素数量 +r(count($group2->acl)) && p() && e('3'); // 针对ID为1的权限分组,设置任务创建权限,查看返回的数据元素数量 +r($group2->acl) && p('task:create') && e('create'); // 针对ID为1的权限分组,设置任务创建权限,查看是否有创建方法 + +system("./ztest init");