snipe_it/tests/Feature/Consumables/Ui/ConsumableIndexTest.php
2024-08-06 20:25:22 +00:00

23 lines
561 B
PHP

<?php
namespace Tests\Feature\Consumables\Ui;
use App\Models\User;
use Tests\TestCase;
final class ConsumableIndexTest extends TestCase
{
public function testPermissionRequiredToViewConsumablesList(): void
{
$this->actingAs(User::factory()->create())
->get(route('consumables.index'))
->assertForbidden();
}
public function testUserCanListConsumables(): void
{
$this->actingAs(User::factory()->superuser()->create())
->get(route('consumables.index'))
->assertOk();
}
}