snipe-it/tests/Feature/Checkins/Api/AccessoryCheckinTest.php

21 lines
539 B
PHP
Raw Normal View History

2024-09-16 16:40:10 -07:00
<?php
namespace Tests\Feature\Checkins\Api;
use App\Models\Accessory;
use App\Models\User;
use Tests\Concerns\TestsPermissionsRequirement;
use Tests\TestCase;
class AccessoryCheckinTest extends TestCase implements TestsPermissionsRequirement
{
public function testRequiresPermission()
{
$accessory = Accessory::factory()->checkedOutToUser()->create();
$this->actingAsForApi(User::factory()->create())
->postJson(route('api.accessories.checkin', $accessory))
->assertForbidden();
}
}