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

20 lines
453 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 DeleteAccessoryTest extends TestCase
{
public function testPermissionRequiredToDeleteAccessory()
{
$accessory = Accessory::factory()->create();
$this->actingAsForApi(User::factory()->create())
->deleteJson(route('api.accessories.destroy', $accessory))
->assertForbidden();
}
}