A free open source IT asset/license management system
Improve scenario naming
Marcus Moore1935a4aca3a0
diff --git a/tests/Feature/Api/Assets/AssetCheckoutTest.php b/tests/Feature/Api/Assets/AssetCheckoutTest.phpindex 0918f050b2..a73bbc708c 100644--- a/tests/Feature/Api/Assets/AssetCheckoutTest.php+++ b/tests/Feature/Api/Assets/AssetCheckoutTest.php@@ -13,7 +13,6 @@ use Tests\TestCase;class AssetCheckoutTest extends TestCase{-protected function setUp(): void{parent::setUp();@@ -86,46 +85,54 @@ class AssetCheckoutTest extends TestCasepublic function checkoutTargets(): array{return [- 'User' => [function () {- $userLocation = Location::factory()->create();- $user = User::factory()->for($userLocation)->create();-- return [- 'checkout_type' => 'user',- 'target' => $user,- 'expected_location' => $userLocation,- ];- }],- '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' => $rtdLocation,- ];- }],- 'Asset with location set' => [function () {- $rtdLocation = Location::factory()->create();- $location = Location::factory()->create();- $asset = Asset::factory()->for($location)->for($rtdLocation, 'defaultLoc')->create();-- return [- 'checkout_type' => 'asset',- 'target' => $asset,- 'expected_location' => $location,- ];- }],- 'Location' => [function () {- $location = Location::factory()->create();-- return [- 'checkout_type' => 'location',- 'target' => $location,- 'expected_location' => $location,- ];- }],+ 'Checkout to User' => [+ function () {+ $userLocation = Location::factory()->create();+ $user = User::factory()->for($userLocation)->create();++ return [+ 'checkout_type' => 'user',+ 'target' => $user,+ 'expected_location' => $userLocation,+ ];+ }+ ],+ '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' => $rtdLocation,+ ];+ }+ ],+ 'Checkout to Asset with location set' => [+ function () {+ $rtdLocation = Location::factory()->create();+ $location = Location::factory()->create();+ $asset = Asset::factory()->for($location)->for($rtdLocation, 'defaultLoc')->create();++ return [+ 'checkout_type' => 'asset',+ 'target' => $asset,+ 'expected_location' => $location,+ ];+ }+ ],+ 'Checkout to Location' => [+ function () {+ $location = Location::factory()->create();++ return [+ 'checkout_type' => 'location',+ 'target' => $location,+ 'expected_location' => $location,+ ];+ }+ ],];}