updating auth test

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5604 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
gwoo 2007-08-29 05:35:38 +00:00
parent 0ed8c17f80
commit 9d2a62752d

View file

@ -361,12 +361,17 @@ class AuthTest extends CakeTestCase {
$this->Controller->Session->del('Auth');
$_SERVER['HTTP_REFERER'] = '/admin/';
$this->Controller->Session->write('Auth', array('AuthUser' => array('id'=>'1', 'username'=>'nate')));
$this->Controller->params['url']['url'] = 'users/login';
$this->Controller->Auth->initialize($this->Controller);
$this->Controller->params['url']['url'] = 'auth_test/login';
$this->Controller->Auth->initialize($this->Controller);
$this->Controller->Auth->loginAction = 'auth_test/login';
$this->Controller->Auth->userModel = 'AuthUser';
$this->Controller->Auth->loginRedirect = null;
$this->Controller->Auth->loginRedirect = false;
$this->Controller->Auth->startup($this->Controller);
$expected = $this->Controller->Auth->_normalizeURL('admin');
$this->assertEqual($expected, $this->Controller->Auth->redirect());