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

20 lines
451 B
PHP
Raw Normal View History

<?php
namespace Tests\Feature\Accessories\Api;
use App\Models\Accessory;
use App\Models\User;
use Tests\TestCase;
class AccessoryUpdateTest extends TestCase
{
public function testPermissionRequiredToUpdateAccessory()
{
$accessory = Accessory::factory()->create();
$this->actingAsForApi(User::factory()->create())
->patchJson(route('api.accessories.update', $accessory))
->assertForbidden();
}
}