Skip to content
This repository has been archived by the owner on Sep 10, 2021. It is now read-only.

Commit

Permalink
ENH: refs #952. Updated test to expect changing password will update …
Browse files Browse the repository at this point in the history
…scheme.
  • Loading branch information
Michael Grauer committed Mar 14, 2013
1 parent 030e441 commit a4ee0d2
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions core/tests/controllers/UserControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -235,19 +235,8 @@ public function testSettingsAction()
$this->assertQuery("div#tabsSettings");
$this->assertQuery("li.settingsCommunityList");

$this->resetAll();
$this->params = array();
$this->params['modifyPassword'] = 'true';
$this->params['oldPassword'] = 'test';
$this->params['newPassword'] = 'newPassword';
$this->request->setMethod('POST');
$this->dispatchUrI("/user/settings", $userDao);
$resp = json_decode($this->getBody());
$this->assertTrue($resp[0] == false);

// Store old password so it will authenticate
$instanceSalt = Zend_Registry::get('configGlobal')->password->prefix;
$this->User->storePasswordHash(hash('sha256', $instanceSalt.$userDao->getSalt().'test'));
// By changing password we will update the salt and hash
$this->resetAll();
$this->params = array();
$this->params['modifyPassword'] = 'true';
Expand Down

0 comments on commit a4ee0d2

Please sign in to comment.