mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-23 11:43:47 -08:00
Add accessory checkin test
This commit is contained in:
parent
eb35608bb5
commit
e835637ef0
20
tests/Feature/Checkins/Api/AccessoryCheckinTest.php
Normal file
20
tests/Feature/Checkins/Api/AccessoryCheckinTest.php
Normal 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();
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue