Adjustments for tests and email validation
This commit is contained in:
parent
1c9fa73d35
commit
30dfcb01c8
|
|
@ -39,7 +39,7 @@ class UpdateUserRequest extends Request
|
|||
'password' => 'nullable|string|min:6',
|
||||
];
|
||||
|
||||
$rules['email'] = ['email:rfc,dns', 'bail', 'sometimes', new UniqueUserRule($this->user, $input['email'])];
|
||||
$rules['email'] = ['email:rfc', 'bail', 'sometimes', new UniqueUserRule($this->user, $input['email'])];
|
||||
|
||||
if (Ninja::isHosted() && $this->phone_has_changed && $this->phone && isset($this->phone)) {
|
||||
$rules['phone'] = ['sometimes', 'bail', 'string', new HasValidPhoneNumber()];
|
||||
|
|
|
|||
|
|
@ -147,6 +147,7 @@ class UserTest extends TestCase
|
|||
|
||||
$data = $user->toArray();
|
||||
|
||||
nlog($data);
|
||||
$response = $this->withHeaders([
|
||||
'X-API-SECRET' => config('ninja.api_secret'),
|
||||
'X-API-TOKEN' => $company_token->token,
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
namespace Tests;
|
||||
|
||||
define('LARAVEL_START', microtime(true));
|
||||
|
||||
use Mockery;
|
||||
use App\Utils\Traits\AppSetup;
|
||||
use Illuminate\Foundation\Testing\TestCase as BaseTestCase;
|
||||
|
|
@ -13,6 +15,7 @@ abstract class TestCase extends BaseTestCase
|
|||
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
||||
parent::setUp();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue