mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-05 19:07:30 -08:00
21 lines
521 B
PHP
21 lines
521 B
PHP
<?php
|
|
|
|
namespace Tests\Feature\Accessories\Api;
|
|
|
|
use App\Models\Accessory;
|
|
use App\Models\User;
|
|
use Tests\Concerns\TestsPermissionsRequirement;
|
|
use Tests\TestCase;
|
|
|
|
class UpdateAccessoryTest extends TestCase implements TestsPermissionsRequirement
|
|
{
|
|
public function testRequiresPermission()
|
|
{
|
|
$accessory = Accessory::factory()->create();
|
|
|
|
$this->actingAsForApi(User::factory()->create())
|
|
->patchJson(route('api.accessories.update', $accessory))
|
|
->assertForbidden();
|
|
}
|
|
}
|