Update tests.

The old tests were relying on the fixed inherit bug. Instead check
a specific permission which will result in a deny.

Refs #8114
This commit is contained in:
mark_story 2016-02-18 21:24:52 -05:00
parent b2509ea13d
commit 4389c79442
2 changed files with 1 additions and 2 deletions

View file

@ -129,7 +129,6 @@ class Permission extends AppModel {
$perms = Hash::extract($perms, '{n}.' . $this->alias); $perms = Hash::extract($perms, '{n}.' . $this->alias);
foreach ($perms as $perm) { foreach ($perms as $perm) {
if ($action === '*') { if ($action === '*') {
foreach ($permKeys as $key) { foreach ($permKeys as $key) {
if (!empty($perm)) { if (!empty($perm)) {
if ($perm[$key] == -1) { if ($perm[$key] == -1) {

View file

@ -253,7 +253,7 @@ class AclShellTest extends CakeTestCase {
$this->Task->args = array('AuthUser.2', 'ROOT/Controller1', 'create'); $this->Task->args = array('AuthUser.2', 'ROOT/Controller1', 'create');
$this->Task->check(); $this->Task->check();
$this->Task->args = array('AuthUser.2', 'ROOT/Controller1', '*'); $this->Task->args = array('AuthUser.2', 'ROOT/Controller1', 'delete');
$this->Task->check(); $this->Task->check();
} }