Implement test

This commit is contained in:
Marcus Moore 2024-05-22 17:21:29 -07:00
parent 67c4fa2966
commit 482ebfbb68
No known key found for this signature in database

View file

@ -63,8 +63,16 @@ class AssetCheckoutTest extends TestCase
public function testAssetCannotBeCheckedOutToItself()
{
// @todo:
$this->markTestIncomplete();
$asset = Asset::factory()->create();
$this->actingAs(User::factory()->checkoutAssets()->create())
->post(route('hardware.checkout.store', $asset), [
'checkout_to_type' => 'asset',
'assigned_asset' => $asset->id,
])
->assertSessionHas('error');
Event::assertNotDispatched(CheckoutableCheckedOut::class);
}
public function testValidationWhenCheckingOutAsset()