a couple notes

This commit is contained in:
spencerrlongg 2023-11-28 22:15:13 -06:00
parent c886fb555b
commit b17078fffd
2 changed files with 2 additions and 1 deletions

View file

@ -20,6 +20,7 @@ class StoreAssetRequest extends ImageUploadRequest
public function prepareForValidation(): void
{
// this needed to be added in because the observer fails if `assigned_to` is null :shrug:
if ($this->has('assigned_user')) {
$assigned_to = $this->assigned_user;
} elseif ($this->has('assigned_location')) {

View file

@ -72,7 +72,7 @@ class AssetStoreTest extends TestCase
$this->assertEquals('2024-06-02', $asset->asset_eol_date);
$this->assertEquals('random_string', $asset->asset_tag);
// @todo: This isn't in the docs but it's in the controller (should it be removed?)
$this->assertEquals($userAssigned->id, $asset->assigned_to);
$this->assertEquals($userAssigned->id, $asset->assigned_to); //todo: figure this out
// @todo: This is not in the docs but it's in the controller
$this->assertTrue($asset->company->is($company));
// @todo: this is explicitly set 0 in the controller but they docs say they are customizable