snipe_it/tests/Feature/Departments/Ui/IndexDepartmentsTest.php
Marcus Moore 3e832e5e94
Revert "Define test classes as final"
This reverts commit 95516b0343.
2024-08-06 13:31:17 -07:00

23 lines
544 B
PHP

<?php
namespace Tests\Feature\Departments\Ui;
use App\Models\User;
use Tests\TestCase;
class IndexDepartmentsTest extends TestCase
{
public function testPermissionRequiredToViewDepartmentsList()
{
$this->actingAs(User::factory()->create())
->get(route('departments.index'))
->assertForbidden();
}
public function testUserCanListDepartments()
{
$this->actingAs(User::factory()->superuser()->create())
->get(route('departments.index'))
->assertOk();
}
}