Исправлены тесты

This commit is contained in:
ErickSkrauch 2016-04-09 03:22:50 +03:00
parent d409a33acd
commit a021b61412
2 changed files with 2 additions and 3 deletions

View File

@ -60,7 +60,7 @@ class ChangePasswordFormTest extends DbTestCase {
$this->specify('successfully change password with modern hash strategy', function() use ($model, $account) {
expect('form should return true', $model->changePassword())->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 */
@ -73,7 +73,7 @@ class ChangePasswordFormTest extends DbTestCase {
$this->specify('successfully change password with legacy hash strategy', function() use ($model, $account) {
expect('form should return true', $model->changePassword())->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);
});
}

View File

@ -47,7 +47,6 @@ return [
'password_hash' => '$2y$13$2rYkap5T6jG8z/mMK8a3Ou6aZxJcmAaTha6FEuujvHEmybSHRzW5e', # password_0
'password_hash_strategy' => \common\models\Account::PASS_HASH_STRATEGY_YII2,
'password_reset_token' => null,
'auth_key' => '45DsaEQ7U8lU9umIyCWk5iCnpdPvZ8Up',
'status' => \common\models\Account::STATUS_REGISTERED,
'created_at' => 1457890086,
'updated_at' => 1457890086,