Skip to content
Permalink
Browse files

Fixing incorrect/failing test in Security component.

  • Loading branch information...
markstory committed Jul 31, 2010
1 parent f5bebc9 commit 59c692dbae35ec7c6400986e4ba951904d3fa52f
Showing with 8 additions and 7 deletions.
  1. +8 −7 cake/tests/cases/libs/controller/components/security.test.php
@@ -170,7 +170,7 @@ function endTest() {
*
* @return void
*/
function testInitialize() {
function testConstructorSettingProperties() {
$settings = array(
'requirePost' => array('edit', 'update'),
'requireSecure' => array('update_account'),
@@ -181,13 +181,14 @@ function testInitialize() {
),
'requireLogin' => array('login'),
);
$Security = new SecurityComponent($this->Controller->Components, $settings);
$this->Controller->Security->initialize($this->Controller, $settings);
$this->assertEqual($this->Controller->Security->requirePost, $settings['requirePost']);
$this->assertEqual($this->Controller->Security->requireSecure, $settings['requireSecure']);
$this->assertEqual($this->Controller->Security->requireGet, $settings['requireGet']);
$this->assertEqual($this->Controller->Security->validatePost, $settings['validatePost']);
$this->assertEqual($this->Controller->Security->loginUsers, $settings['loginUsers']);
$this->assertEqual($this->Controller->Security->requireLogin, $settings['requireLogin']);
$this->assertEqual($Security->requirePost, $settings['requirePost']);
$this->assertEqual($Security->requireSecure, $settings['requireSecure']);
$this->assertEqual($Security->requireGet, $settings['requireGet']);
$this->assertEqual($Security->validatePost, $settings['validatePost']);
$this->assertEqual($Security->loginUsers, $settings['loginUsers']);
$this->assertEqual($Security->requireLogin, $settings['requireLogin']);
}
/**

0 comments on commit 59c692d

Please sign in to comment.
You can’t perform that action at this time.