mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-14 17:44:17 -08:00
0a7e053985
Signed-off-by: snipe <snipe@snipe.net>
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();
|
|
}
|
|
}
|