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

20 lines
443 B
PHP
Raw Normal View History

<?php
namespace Tests\Feature\Accessories\Api;
use App\Models\Accessory;
use App\Models\User;
use Tests\TestCase;
2024-09-09 14:36:32 -07:00
class ShowAccessoryTest extends TestCase
{
public function testPermissionRequiredToShowAccessory()
{
$accessory = Accessory::factory()->create();
$this->actingAsForApi(User::factory()->create())
->getJson(route('api.accessories.show', $accessory))
->assertForbidden();
}
}