mirror of
https://github.com/elyby/accounts.git
synced 2025-05-31 14:11:46 +05:30
Исправлены тесты
This commit is contained in:
parent
d409a33acd
commit
a021b61412
@ -60,7 +60,7 @@ class ChangePasswordFormTest extends DbTestCase {
|
|||||||
$this->specify('successfully change password with modern hash strategy', function() use ($model, $account) {
|
$this->specify('successfully change password with modern hash strategy', function() use ($model, $account) {
|
||||||
expect('form should return true', $model->changePassword())->true();
|
expect('form should return true', $model->changePassword())->true();
|
||||||
expect('new password should be successfully stored into account', $account->validatePassword('my-new-password'))->true();
|
expect('new password should be successfully stored into account', $account->validatePassword('my-new-password'))->true();
|
||||||
expect('password change time updated', $account->password_changed_at)->greaterOrEquals(time());
|
expect('password change time updated', $account->password_changed_at)->greaterOrEquals(time() - 2);
|
||||||
});
|
});
|
||||||
|
|
||||||
/** @var Account $account */
|
/** @var Account $account */
|
||||||
@ -73,7 +73,7 @@ class ChangePasswordFormTest extends DbTestCase {
|
|||||||
$this->specify('successfully change password with legacy hash strategy', function() use ($model, $account) {
|
$this->specify('successfully change password with legacy hash strategy', function() use ($model, $account) {
|
||||||
expect('form should return true', $model->changePassword())->true();
|
expect('form should return true', $model->changePassword())->true();
|
||||||
expect('new password should be successfully stored into account', $account->validatePassword('my-new-password'))->true();
|
expect('new password should be successfully stored into account', $account->validatePassword('my-new-password'))->true();
|
||||||
expect('password change time updated', $account->password_changed_at)->greaterOrEquals(time());
|
expect('password change time updated', $account->password_changed_at)->greaterOrEquals(time() - 2);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -47,7 +47,6 @@ return [
|
|||||||
'password_hash' => '$2y$13$2rYkap5T6jG8z/mMK8a3Ou6aZxJcmAaTha6FEuujvHEmybSHRzW5e', # password_0
|
'password_hash' => '$2y$13$2rYkap5T6jG8z/mMK8a3Ou6aZxJcmAaTha6FEuujvHEmybSHRzW5e', # password_0
|
||||||
'password_hash_strategy' => \common\models\Account::PASS_HASH_STRATEGY_YII2,
|
'password_hash_strategy' => \common\models\Account::PASS_HASH_STRATEGY_YII2,
|
||||||
'password_reset_token' => null,
|
'password_reset_token' => null,
|
||||||
'auth_key' => '45DsaEQ7U8lU9umIyCWk5iCnpdPvZ8Up',
|
|
||||||
'status' => \common\models\Account::STATUS_REGISTERED,
|
'status' => \common\models\Account::STATUS_REGISTERED,
|
||||||
'created_at' => 1457890086,
|
'created_at' => 1457890086,
|
||||||
'updated_at' => 1457890086,
|
'updated_at' => 1457890086,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user