Убран валидатор на тип алгоритма хэширования пароля для формы инициализации смены E-mail адреса

This commit is contained in:
ErickSkrauch
2016-05-23 22:55:36 +03:00
parent fe2c422621
commit b5ed01853e
2 changed files with 3 additions and 27 deletions

View File

@ -45,24 +45,6 @@ class InitStateFormTest extends DbTestCase {
];
}
public function testValidateAccountPasswordHashStrategy() {
$this->specify('we cannot change password on old password hash strategy', function() {
$account = new Account();
$account->password_hash_strategy = Account::PASS_HASH_STRATEGY_OLD_ELY;
$model = new InitStateForm($account);
$model->validateAccountPasswordHashStrategy('email');
expect($model->getErrors('email'))->equals(['error.old_hash_strategy']);
});
$this->specify('no errors on modern password hash strategy', function() {
$account = new Account();
$account->password_hash_strategy = Account::PASS_HASH_STRATEGY_YII2;
$model = new InitStateForm($account);
$model->validateAccountPasswordHashStrategy('email');
expect($model->getErrors('email'))->isEmpty();
});
}
public function testCreateCode() {
$this->specify('create valid code and store it to database', function() {
/** @var Account $account */