3
0
mirror of https://github.com/snipe/snipe-it.git synced 2026-03-07 08:58:51 +00:00
Files
snipe-it/tests/Feature/Components/Ui/ComponentIndexTest.php
Marcus Moore 82e795b642 Revert "Add return types to test methods"
This reverts commit 83fb6826ee.
2024-08-06 13:30:34 -07:00

24 lines
543 B
PHP

<?php
namespace Tests\Feature\Components\Ui;
use App\Models\User;
use Tests\TestCase;
final class ComponentIndexTest extends TestCase
{
public function testPermissionRequiredToViewComponentsList()
{
$this->actingAs(User::factory()->create())
->get(route('components.index'))
->assertForbidden();
}
public function testUserCanListComponents()
{
$this->actingAs(User::factory()->superuser()->create())
->get(route('components.index'))
->assertOk();
}
}