mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-15 10:04:13 -08:00
20 lines
453 B
PHP
20 lines
453 B
PHP
<?php
|
|
|
|
namespace Tests\Feature\Accessories\Api;
|
|
|
|
use App\Models\Accessory;
|
|
use App\Models\User;
|
|
use Tests\TestCase;
|
|
|
|
class DeleteAccessoryTest extends TestCase
|
|
{
|
|
public function testPermissionRequiredToDeleteAccessory()
|
|
{
|
|
$accessory = Accessory::factory()->create();
|
|
|
|
$this->actingAsForApi(User::factory()->create())
|
|
->deleteJson(route('api.accessories.destroy', $accessory))
|
|
->assertForbidden();
|
|
}
|
|
}
|