mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-13 06:47:46 -08:00
Implement test
This commit is contained in:
parent
f28a82de71
commit
fa5016713f
|
@ -55,7 +55,14 @@ class AssetCheckoutTest extends TestCase
|
||||||
|
|
||||||
public function testAssetCannotBeCheckedOutToItself()
|
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()
|
public function testValidationWhenCheckingOutAsset()
|
||||||
|
@ -125,8 +132,6 @@ class AssetCheckoutTest extends TestCase
|
||||||
/** @dataProvider checkoutTargets */
|
/** @dataProvider checkoutTargets */
|
||||||
public function testAssetCanBeCheckedOut($data)
|
public function testAssetCanBeCheckedOut($data)
|
||||||
{
|
{
|
||||||
// $this->markTestIncomplete();
|
|
||||||
|
|
||||||
['checkout_type' => $type, 'target' => $target, 'expected_location' => $expectedLocation] = $data();
|
['checkout_type' => $type, 'target' => $target, 'expected_location' => $expectedLocation] = $data();
|
||||||
|
|
||||||
$newStatus = Statuslabel::factory()->readyToDeploy()->create();
|
$newStatus = Statuslabel::factory()->readyToDeploy()->create();
|
||||||
|
|
Loading…
Reference in a new issue