write test for the lists
This commit is contained in:
@@ -24,17 +24,17 @@ class SupervisorIndexTest extends TestCase
|
||||
$response->assertForbidden();
|
||||
}
|
||||
|
||||
public function test_operator_can_see_the_data_table(): void
|
||||
public function test_supervisor_can_see_the_data_table(): void
|
||||
{
|
||||
$user = User::factory()
|
||||
->has(Permission::factory([
|
||||
'name' => 'create-road-item'
|
||||
'name' => 'show-road-item-supervise-cartable'
|
||||
]))
|
||||
->create();
|
||||
|
||||
RoadItemsProject::factory(10)->create();
|
||||
|
||||
$response = $this->actingAs($user)->getJson(route('v3.road_items.operatorIndex', [
|
||||
$response = $this->actingAs($user)->getJson(route('v3.road_items.supervisorIndex', [
|
||||
'size' => 10,
|
||||
'start' => 0,
|
||||
'sorting' => json_encode([]),
|
||||
@@ -90,6 +90,7 @@ class SupervisorIndexTest extends TestCase
|
||||
"cmms_machine_code",
|
||||
"rahdar_id",
|
||||
"rahdar_code",
|
||||
"can_supervise",
|
||||
],
|
||||
]
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user