Skip to content

Commit

Permalink
Added tests to deny() and deny('*')
Browse files Browse the repository at this point in the history
  • Loading branch information
Danielpk committed Oct 27, 2011
1 parent 5246e7d commit 8738ef3
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions lib/Cake/Test/Case/Controller/Component/AuthComponentTest.php
Expand Up @@ -636,6 +636,25 @@ public function testAllowDenyAll() {

$this->Controller->request['action'] = 'camelCase';
$this->assertFalse($this->Controller->Auth->startup($this->Controller));

$this->Controller->Auth->allow('*');
$this->Controller->Auth->deny('*');

$this->Controller->request['action'] = 'camelCase';
$this->assertFalse($this->Controller->Auth->startup($this->Controller));

$this->Controller->request['action'] = 'add';
$this->assertFalse($this->Controller->Auth->startup($this->Controller));

$this->Controller->Auth->allow('camelCase');
$this->Controller->Auth->deny();

$this->Controller->request['action'] = 'camelCase';
$this->assertFalse($this->Controller->Auth->startup($this->Controller));

$this->Controller->request['action'] = 'login';
$this->assertFalse($this->Controller->Auth->startup($this->Controller));

}

/**
Expand Down

0 comments on commit 8738ef3

Please sign in to comment.