Implement test

This commit is contained in:
Marcus Moore 2024-04-10 17:29:44 -07:00
parent f28a82de71
commit fa5016713f
No known key found for this signature in database

View file

@ -55,7 +55,14 @@ class AssetCheckoutTest extends TestCase
public function testAssetCannotBeCheckedOutToItself()
{
$this->markTestIncomplete();
$asset = Asset::factory()->create();
$this->actingAsForApi(User::factory()->checkoutAssets()->create())
->postJson(route('api.asset.checkout', $asset), [
'checkout_to_type' => 'asset',
'assigned_asset' => $asset->id,
])
->assertStatusMessageIs('error');
}
public function testValidationWhenCheckingOutAsset()
@ -125,8 +132,6 @@ class AssetCheckoutTest extends TestCase
/** @dataProvider checkoutTargets */
public function testAssetCanBeCheckedOut($data)
{
// $this->markTestIncomplete();
['checkout_type' => $type, 'target' => $target, 'expected_location' => $expectedLocation] = $data();
$newStatus = Statuslabel::factory()->readyToDeploy()->create();