snipe-it/tests/Feature/Accessories/Api/IndexAccessoryTest.php

18 lines
425 B
PHP

<?php
namespace Tests\Feature\Accessories\Api;
use App\Models\User;
use Tests\Concerns\TestsPermissionsRequirement;
use Tests\TestCase;
class IndexAccessoryTest extends TestCase implements TestsPermissionsRequirement
{
public function testRequiresPermission()
{
$this->actingAsForApi(User::factory()->create())
->getJson(route('api.accessories.index'))
->assertForbidden();
}
}