36 lines
934 B
PHP
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'])
|
|
]);
|
|
}
|
|
}
|