29 lines
808 B
PHP
29 lines
808 B
PHP
<?php
|
|
|
|
namespace Tests\Feature\Requests\Admin;
|
|
|
|
use App\Http\Requests\Admin\WithdrawRejectRequest;
|
|
use Tests\Concerns\ValidatesFormRequests;
|
|
use Tests\TestCase;
|
|
|
|
class WithdrawRejectRequestTest extends TestCase
|
|
{
|
|
use ValidatesFormRequests;
|
|
|
|
public function test_passes_without_note(): void
|
|
{
|
|
$this->assertPasses(WithdrawRejectRequest::class, []);
|
|
$this->assertPasses(WithdrawRejectRequest::class, ['note' => null]);
|
|
}
|
|
|
|
public function test_passes_with_note(): void
|
|
{
|
|
$this->assertPasses(WithdrawRejectRequest::class, ['note' => 'اطلاعات کارت ناقص است']);
|
|
}
|
|
|
|
public function test_fails_when_note_exceeds_limit(): void
|
|
{
|
|
$this->assertFailsOn('note', WithdrawRejectRequest::class, ['note' => str_repeat('a', 1001)]);
|
|
}
|
|
}
|