mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
cleaned up
This commit is contained in:
parent
6e5f296a13
commit
ca8765e1d7
|
@ -39,9 +39,8 @@ class AssetStoreTest extends TestCase
|
||||||
->postJson(route('api.assets.store'), [
|
->postJson(route('api.assets.store'), [
|
||||||
'asset_eol_date' => '2024-06-02',
|
'asset_eol_date' => '2024-06-02',
|
||||||
'asset_tag' => 'random_string',
|
'asset_tag' => 'random_string',
|
||||||
'assigned_user' => $userAssigned->id, // assigned_to is set in the request, assigned_to isn't set through the api request
|
'assigned_user' => $userAssigned->id,
|
||||||
'company_id' => $company->id,
|
'company_id' => $company->id,
|
||||||
//'depreciate' => true, // set explicitly in controller
|
|
||||||
'last_audit_date' => '2023-09-03',
|
'last_audit_date' => '2023-09-03',
|
||||||
'location_id' => $location->id,
|
'location_id' => $location->id,
|
||||||
'model_id' => $model->id,
|
'model_id' => $model->id,
|
||||||
|
@ -56,7 +55,6 @@ class AssetStoreTest extends TestCase
|
||||||
'status_id' => $status->id,
|
'status_id' => $status->id,
|
||||||
'supplier_id' => $supplier->id,
|
'supplier_id' => $supplier->id,
|
||||||
'warranty_months' => 10,
|
'warranty_months' => 10,
|
||||||
//'physical' => true, // set explicitly in controller
|
|
||||||
])
|
])
|
||||||
->assertOk()
|
->assertOk()
|
||||||
->assertStatusMessageIs('success')
|
->assertStatusMessageIs('success')
|
||||||
|
@ -66,17 +64,13 @@ class AssetStoreTest extends TestCase
|
||||||
|
|
||||||
$this->assertTrue($asset->adminuser->is($user));
|
$this->assertTrue($asset->adminuser->is($user));
|
||||||
|
|
||||||
// @todo: This isn't in the docs but it's in the controller
|
|
||||||
$this->assertEquals('2024-06-02', $asset->asset_eol_date);
|
$this->assertEquals('2024-06-02', $asset->asset_eol_date);
|
||||||
$this->assertEquals('random_string', $asset->asset_tag);
|
$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: This is not in the docs but it's in the controller (company_id)
|
|
||||||
$this->assertTrue($asset->company->is($company));
|
$this->assertTrue($asset->company->is($company));
|
||||||
// @todo: this is in the docs but not the controller
|
// I don't see this on the GUI side either, but it's in the docs so I'm guessing that's a mistake? It wasn't in the controller.
|
||||||
// $this->assertEquals('2023-09-03', $asset->last_audit_date);
|
// $this->assertEquals('2023-09-03', $asset->last_audit_date);
|
||||||
// @todo: this is set to rtd_location_id in the controller but customizable in the docs
|
$this->assertTrue($asset->location->is($location));
|
||||||
// $this->assertTrue($asset->location->is($location));
|
|
||||||
$this->assertTrue($asset->model->is($model));
|
$this->assertTrue($asset->model->is($model));
|
||||||
$this->assertEquals('A New Asset', $asset->name);
|
$this->assertEquals('A New Asset', $asset->name);
|
||||||
$this->assertEquals('Some notes', $asset->notes);
|
$this->assertEquals('Some notes', $asset->notes);
|
||||||
|
|
Loading…
Reference in a new issue