Add accessory checkin test

This commit is contained in:
Marcus Moore 2024-09-16 16:40:10 -07:00
parent eb35608bb5
commit e835637ef0
No known key found for this signature in database

View file

@ -0,0 +1,20 @@
<?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();
}
}