mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-09 12:57:41 -08:00
21 lines
539 B
PHP
21 lines
539 B
PHP
|
<?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();
|
||
|
}
|
||
|
}
|