A free open source IT asset/license management system
Re-order scenarios
Marcus Moore1fe22e4b7bc3
diff --git a/tests/Feature/Api/Assets/AssetCheckoutTest.php b/tests/Feature/Api/Assets/AssetCheckoutTest.phpindex 1199f8c6d4..471b67a004 100644--- a/tests/Feature/Api/Assets/AssetCheckoutTest.php+++ b/tests/Feature/Api/Assets/AssetCheckoutTest.php@@ -85,52 +85,52 @@ class AssetCheckoutTest extends TestCasepublic function checkoutTargets(): array{return [- 'Checkout to User without location set' => [+ 'Checkout to User' => [function () {$userLocation = Location::factory()->create();- $user = User::factory()->for($userLocation)->create(['location_id' => null]);+ $user = User::factory()->for($userLocation)->create();return ['checkout_type' => 'user','target' => $user,- 'expected_location' => null,+ 'expected_location' => $userLocation,];}],- 'Checkout to User' => [+ 'Checkout to User without location set' => [function () {$userLocation = Location::factory()->create();- $user = User::factory()->for($userLocation)->create();+ $user = User::factory()->for($userLocation)->create(['location_id' => null]);return ['checkout_type' => 'user','target' => $user,- 'expected_location' => $userLocation,+ 'expected_location' => null,];}],- 'Checkout to Asset without location set' => [+ 'Checkout to Asset with location set' => [function () {$rtdLocation = Location::factory()->create();- $asset = Asset::factory()->for($rtdLocation, 'defaultLoc')->create(['location_id' => null]);+ $location = Location::factory()->create();+ $asset = Asset::factory()->for($location)->for($rtdLocation, 'defaultLoc')->create();return ['checkout_type' => 'asset','target' => $asset,- 'expected_location' => null,+ 'expected_location' => $location,];}],- 'Checkout to Asset with location set' => [+ 'Checkout to Asset without location set' => [function () {$rtdLocation = Location::factory()->create();- $location = Location::factory()->create();- $asset = Asset::factory()->for($location)->for($rtdLocation, 'defaultLoc')->create();+ $asset = Asset::factory()->for($rtdLocation, 'defaultLoc')->create(['location_id' => null]);return ['checkout_type' => 'asset','target' => $asset,- 'expected_location' => $location,+ 'expected_location' => null,];}],