Files
backend/tests/Feature/V2/Dashboard/RoadPatrolProject/DeleteTest.php
2024-03-10 16:31:24 +03:30

36 lines
934 B
PHP

<?php
namespace Tests\Feature\V2\Dashboard\RoadPatrolProject;
use App\Models\City;
use App\Models\EdarateOstani;
use App\Models\EdarateShahri;
use App\Models\InfoItem;
use App\Models\Permission;
use App\Models\RoadPatrol;
use App\Models\User;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Foundation\Testing\WithFaker;
use Tests\TestCase;
class DeleteTest extends TestCase
{
use RefreshDatabase, WithFaker;
/**
* A basic feature test example.
*/
public function test_type_is_required(): void
{
$user = User::factory()->create();
$roadPatrol = RoadPatrol::factory()->create();
$response = $this->actingAs($user)->postJson("v2/road_patrols/supervisor/cartable/delete/{$roadPatrol->id}");
$response->assertUnprocessable()
->assertInvalid([
'type' => __('validation.required', ['attribute' => 'type'])
]);
}
}