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