mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-14 17:44:17 -08:00
24 lines
536 B
PHP
24 lines
536 B
PHP
|
<?php
|
||
|
|
||
|
namespace Tests\Feature\Categories\Ui;
|
||
|
|
||
|
use App\Models\User;
|
||
|
use Tests\TestCase;
|
||
|
|
||
|
class IndexCategoriesTest extends TestCase
|
||
|
{
|
||
|
public function testPermissionRequiredToViewCategoryList()
|
||
|
{
|
||
|
$this->actingAs(User::factory()->create())
|
||
|
->get(route('categories.index'))
|
||
|
->assertForbidden();
|
||
|
}
|
||
|
|
||
|
public function testUserCanListCategories()
|
||
|
{
|
||
|
$this->actingAs(User::factory()->superuser()->create())
|
||
|
->get(route('categories.index'))
|
||
|
->assertOk();
|
||
|
}
|
||
|
}
|