29 lines
818 B
PHP
29 lines
818 B
PHP
<?php
|
|
|
|
namespace Tests\Feature\Requests\Client;
|
|
|
|
use App\Http\Requests\Client\CaseRejectRequest;
|
|
use Tests\Concerns\ValidatesFormRequests;
|
|
use Tests\TestCase;
|
|
|
|
class CaseRejectRequestTest extends TestCase
|
|
{
|
|
use ValidatesFormRequests;
|
|
|
|
public function test_passes_with_reason(): void
|
|
{
|
|
$this->assertPasses(CaseRejectRequest::class, ['reason' => 'تصاویر ناخوانا هستند']);
|
|
}
|
|
|
|
public function test_fails_without_reason(): void
|
|
{
|
|
$this->assertFailsOn('reason', CaseRejectRequest::class, []);
|
|
$this->assertFailsOn('reason', CaseRejectRequest::class, ['reason' => '']);
|
|
}
|
|
|
|
public function test_fails_when_reason_exceeds_limit(): void
|
|
{
|
|
$this->assertFailsOn('reason', CaseRejectRequest::class, ['reason' => str_repeat('a', 1001)]);
|
|
}
|
|
}
|