mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -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
|
public function checkoutTargets(): array
|
||||||
{
|
{
|
||||||
return [
|
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' => [
|
'Checkout to User' => [
|
||||||
function () {
|
function () {
|
||||||
$userLocation = Location::factory()->create();
|
$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 () {
|
function () {
|
||||||
$rtdLocation = Location::factory()->create();
|
$userLocation = Location::factory()->create();
|
||||||
$asset = Asset::factory()->for($rtdLocation, 'defaultLoc')->create(['location_id' => null]);
|
$user = User::factory()->for($userLocation)->create(['location_id' => null]);
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'checkout_type' => 'asset',
|
'checkout_type' => 'user',
|
||||||
'target' => $asset,
|
'target' => $user,
|
||||||
'expected_location' => null,
|
'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' => [
|
'Checkout to Location' => [
|
||||||
function () {
|
function () {
|
||||||
$location = Location::factory()->create();
|
$location = Location::factory()->create();
|
||||||
|
|
Loading…
Reference in a new issue