snipe-it/tests/Feature/Accessories/Ui/AccessoriesIndexTest.php
2024-12-16 17:45:10 -08:00

24 lines
531 B
PHP

<?php
namespace Tests\Feature\Accessories\Ui;
use App\Models\User;
use Tests\TestCase;
class AccessoriesIndexTest extends TestCase
{
public function testPermissionRequiredToViewAccessoryList()
{
$this->actingAs(User::factory()->create())
->get(route('accessories.index'))
->assertForbidden();
}
public function testPageRenders()
{
$this->actingAs(User::factory()->superuser()->create())
->get(route('accessories.index'))
->assertOk();
}
}