use DB::transaction

This commit is contained in:
2024-04-16 14:58:23 +03:30
parent 4b4f621b34
commit f9d842b6f4
24 changed files with 286 additions and 123 deletions

View File

@@ -5,12 +5,12 @@ namespace Tests\Feature\V2\Dashboard\RoadPatrolProject;
use App\Models\Province;
use App\Models\RoadPatrol;
use App\Models\User;
use Illuminate\Foundation\Testing\DatabaseTruncation;
use Illuminate\Foundation\Testing\RefreshDataBase;
use Tests\TestCase;
class GetAllDataToMapTest extends TestCase
{
use DatabaseTruncation;
use RefreshDataBase;
/**
* A basic feature test example.
*/
@@ -75,7 +75,9 @@ class GetAllDataToMapTest extends TestCase
// 'edare_id' => 1,
// ]));
$response = $this->actingAs($user)->getJson('/v2/road_patrols/report/map?date_from=2021-05-02&date_to=2024-09-01&province_id=1&edare_id=1');
$response = $this->actingAs($user)->getJson("/v2/road_patrols/report/map?date_from=2021-05-02&date_to=2024-09-01&province_id={$province->id}&edare_id=1");
// dd(RoadPatrol::query()->first(), $province->id);
$response->assertStatus(200)
->assertExactJson([