delete test
This commit is contained in:
35
tests/Feature/V2/Dashboard/RoadPatrolProject/DeleteTest.php
Normal file
35
tests/Feature/V2/Dashboard/RoadPatrolProject/DeleteTest.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?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'])
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user