wrote test for restore,supervisorIndex,verify

This commit is contained in:
2025-03-12 17:01:14 +03:30
parent 30ff1b022a
commit 1c0ebdb9ab
4 changed files with 224 additions and 30 deletions

View File

@@ -23,6 +23,13 @@ class SupervisorIndexTest extends TestCase
$response->assertForbidden();
}
public function test_user_cannot_access_authentication_to_supervisor_index(): void
{
$response = $this->getJson(route('v3.road_items.supervisorIndex'));
$response->assertStatus(401);
}
public function test_supervisor_can_see_the_data_table(): void
{
@@ -47,49 +54,21 @@ class SupervisorIndexTest extends TestCase
'data' => [
'*' => [
"id",
"user_id",
"start_lat",
"start_lng",
"end_lat",
"end_lng",
"project_distance",
"item",
"item_fa",
"sub_item",
"sub_item_fa",
"sub_item_data",
"sub_items",
"sub_items_data",
"created_at",
"updated_at",
"province_id",
"province_fa",
"city_id",
"city_fa",
"is_new",
"parent_id",
"start_way_id",
"end_way_id",
"unit_fa",
"user_name",
"created_at_fa",
"info_id",
"status",
"status_fa",
"edarat_id",
"edarat_name",
"edarat_type",
"activity_date",
"activity_time",
"activity_date_time",
"supervisor_id",
"supervisor_name",
"supervisor_description",
"supervising_time",
"cmms_machine_id",
"cmms_machine_code",
"rahdar_id",
"rahdar_code",
"can_supervise",
],
]