snipe-it/tests/Feature/Checkins/Ui/ComponentCheckinTest.php
snipe e8ec11652f Very basic checkin tests
Signed-off-by: snipe <snipe@snipe.net>
2024-07-26 13:16:31 +01:00

22 lines
491 B
PHP

<?php
namespace Tests\Feature\Checkins\Ui;
use App\Models\Component;
use App\Models\User;
use Tests\TestCase;
class ComponentCheckinTest extends TestCase
{
public function testCheckingInComponentRequiresCorrectPermission()
{
$this->actingAs(User::factory()->create())
->post(route('components.checkin.store', [
'componentID' => Component::factory()->checkedOutToAsset()->create()->id,
]))
->assertForbidden();
}
}