mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 05:34:06 -08:00
Improve scenario naming
This commit is contained in:
parent
5567a1e9ac
commit
1935a4aca3
|
@ -13,7 +13,6 @@ use Tests\TestCase;
|
|||
|
||||
class AssetCheckoutTest extends TestCase
|
||||
{
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
@ -86,7 +85,8 @@ class AssetCheckoutTest extends TestCase
|
|||
public function checkoutTargets(): array
|
||||
{
|
||||
return [
|
||||
'User' => [function () {
|
||||
'Checkout to User' => [
|
||||
function () {
|
||||
$userLocation = Location::factory()->create();
|
||||
$user = User::factory()->for($userLocation)->create();
|
||||
|
||||
|
@ -95,8 +95,10 @@ class AssetCheckoutTest extends TestCase
|
|||
'target' => $user,
|
||||
'expected_location' => $userLocation,
|
||||
];
|
||||
}],
|
||||
'Asset without location set' => [function () {
|
||||
}
|
||||
],
|
||||
'Checkout to Asset without location set' => [
|
||||
function () {
|
||||
$rtdLocation = Location::factory()->create();
|
||||
$asset = Asset::factory()->for($rtdLocation, 'defaultLoc')->create(['location_id' => null]);
|
||||
|
||||
|
@ -105,8 +107,10 @@ class AssetCheckoutTest extends TestCase
|
|||
'target' => $asset,
|
||||
'expected_location' => $rtdLocation,
|
||||
];
|
||||
}],
|
||||
'Asset with location set' => [function () {
|
||||
}
|
||||
],
|
||||
'Checkout to Asset with location set' => [
|
||||
function () {
|
||||
$rtdLocation = Location::factory()->create();
|
||||
$location = Location::factory()->create();
|
||||
$asset = Asset::factory()->for($location)->for($rtdLocation, 'defaultLoc')->create();
|
||||
|
@ -116,8 +120,10 @@ class AssetCheckoutTest extends TestCase
|
|||
'target' => $asset,
|
||||
'expected_location' => $location,
|
||||
];
|
||||
}],
|
||||
'Location' => [function () {
|
||||
}
|
||||
],
|
||||
'Checkout to Location' => [
|
||||
function () {
|
||||
$location = Location::factory()->create();
|
||||
|
||||
return [
|
||||
|
@ -125,7 +131,8 @@ class AssetCheckoutTest extends TestCase
|
|||
'target' => $location,
|
||||
'expected_location' => $location,
|
||||
];
|
||||
}],
|
||||
}
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue