Добавлена защита от регистрации на сервисы 10-минутной почты

This commit is contained in:
ErickSkrauch
2016-05-01 19:43:28 +03:00
parent 45b1f43d09
commit 479f633d3f
3 changed files with 10 additions and 1 deletions

View File

@@ -103,6 +103,12 @@ class AccountTest extends DbTestCase {
expect($model->getErrors('email'))->equals(['error.email_invalid']);
});
$this->specify('email should be not tempmail', function() {
$model = new Account(['email' => 'c1414001@trbvn.com']);
expect($model->validate(['email']))->false();
expect($model->getErrors('email'))->equals(['error.email_is_tempmail']);
});
$this->specify('email should be unique', function() {
$model = new Account(['email' => $this->accounts['admin']['email']]);
expect($model->validate('email'))->false();