Re-order scenarios

This commit is contained in:
Marcus Moore 2024-05-22 13:33:41 -07:00
parent c7fa2c04ad
commit 1fe22e4b7b
No known key found for this signature in database

View file

@ -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();