mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-11 22:07:29 -08:00
Re-order scenarios
This commit is contained in:
parent
c7fa2c04ad
commit
1fe22e4b7b
|
@ -85,18 +85,6 @@ class AssetCheckoutTest extends TestCase
|
|||
public function checkoutTargets(): array
|
||||
{
|
||||
return [
|
||||
'Checkout to User without location set' => [
|
||||
function () {
|
||||
$userLocation = Location::factory()->create();
|
||||
$user = User::factory()->for($userLocation)->create(['location_id' => null]);
|
||||
|
||||
return [
|
||||
'checkout_type' => 'user',
|
||||
'target' => $user,
|
||||
'expected_location' => null,
|
||||
];
|
||||
}
|
||||
],
|
||||
'Checkout to User' => [
|
||||
function () {
|
||||
$userLocation = Location::factory()->create();
|
||||
|
@ -109,14 +97,14 @@ class AssetCheckoutTest extends TestCase
|
|||
];
|
||||
}
|
||||
],
|
||||
'Checkout to Asset without location set' => [
|
||||
'Checkout to User without location set' => [
|
||||
function () {
|
||||
$rtdLocation = Location::factory()->create();
|
||||
$asset = Asset::factory()->for($rtdLocation, 'defaultLoc')->create(['location_id' => null]);
|
||||
$userLocation = Location::factory()->create();
|
||||
$user = User::factory()->for($userLocation)->create(['location_id' => null]);
|
||||
|
||||
return [
|
||||
'checkout_type' => 'asset',
|
||||
'target' => $asset,
|
||||
'checkout_type' => 'user',
|
||||
'target' => $user,
|
||||
'expected_location' => null,
|
||||
];
|
||||
}
|
||||
|
@ -134,6 +122,18 @@ class AssetCheckoutTest extends TestCase
|
|||
];
|
||||
}
|
||||
],
|
||||
'Checkout to Asset without location set' => [
|
||||
function () {
|
||||
$rtdLocation = Location::factory()->create();
|
||||
$asset = Asset::factory()->for($rtdLocation, 'defaultLoc')->create(['location_id' => null]);
|
||||
|
||||
return [
|
||||
'checkout_type' => 'asset',
|
||||
'target' => $asset,
|
||||
'expected_location' => null,
|
||||
];
|
||||
}
|
||||
],
|
||||
'Checkout to Location' => [
|
||||
function () {
|
||||
$location = Location::factory()->create();
|
||||
|
|
Loading…
Reference in a new issue