mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-30 07:59:50 -08:00
24 lines
544 B
PHP
24 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();
|
||
|
}
|
||
|
}
|