mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-09 23:24:06 -08:00
Complete a scenario
This commit is contained in:
parent
5d368990dc
commit
8ca882d1c8
|
@ -829,7 +829,6 @@ class AssetsController extends Controller
|
|||
$error_payload['target_type'] = 'location';
|
||||
|
||||
} elseif (request('checkout_to_type') == 'asset') {
|
||||
// @todo: test this code path
|
||||
$target = Asset::where('id', '!=', $asset_id)->find(request('assigned_asset'));
|
||||
// Override with the asset's location_id if it has one
|
||||
$asset->location_id = (($target) && (isset($target->location_id))) ? $target->location_id : '';
|
||||
|
|
|
@ -142,7 +142,7 @@ class AssetCheckoutTest extends TestCase
|
|||
['checkout_type' => $type, 'target' => $target, 'expected_location' => $expectedLocation] = $data();
|
||||
|
||||
$newStatus = Statuslabel::factory()->readyToDeploy()->create();
|
||||
$asset = Asset::factory()->create();
|
||||
$asset = Asset::factory()->forLocation()->create();
|
||||
$admin = User::factory()->checkoutAssets()->create();
|
||||
|
||||
$this->actingAsForApi($admin)
|
||||
|
|
Loading…
Reference in a new issue