mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-09 23:24:06 -08:00
Clean up
This commit is contained in:
parent
2044570e95
commit
0ec415d4d0
|
@ -5,11 +5,10 @@ namespace Tests\Feature\AssetModels\Api;
|
||||||
use App\Models\Asset;
|
use App\Models\Asset;
|
||||||
use App\Models\AssetModel;
|
use App\Models\AssetModel;
|
||||||
use App\Models\User;
|
use App\Models\User;
|
||||||
use Tests\Concerns\TestsMultipleFullCompanySupport;
|
|
||||||
use Tests\Concerns\TestsPermissionsRequirement;
|
use Tests\Concerns\TestsPermissionsRequirement;
|
||||||
use Tests\TestCase;
|
use Tests\TestCase;
|
||||||
|
|
||||||
class DeleteAssetModelsTest extends TestCase implements TestsMultipleFullCompanySupport, TestsPermissionsRequirement
|
class DeleteAssetModelsTest extends TestCase implements TestsPermissionsRequirement
|
||||||
{
|
{
|
||||||
public function testRequiresPermission()
|
public function testRequiresPermission()
|
||||||
{
|
{
|
||||||
|
@ -33,19 +32,12 @@ class DeleteAssetModelsTest extends TestCase implements TestsMultipleFullCompany
|
||||||
|
|
||||||
public function testCannotDeleteAssetModelThatStillHasAssociatedAssets()
|
public function testCannotDeleteAssetModelThatStillHasAssociatedAssets()
|
||||||
{
|
{
|
||||||
$asset = Asset::factory()->create();
|
$assetModel = Asset::factory()->create()->model;
|
||||||
|
|
||||||
$this->actingAsForApi(User::factory()->deleteAssetModels()->create())
|
$this->actingAsForApi(User::factory()->deleteAssetModels()->create())
|
||||||
->deleteJson(route('api.models.destroy', $asset->model))
|
->deleteJson(route('api.models.destroy', $assetModel))
|
||||||
->assertStatusMessageIs('error');
|
->assertStatusMessageIs('error');
|
||||||
|
|
||||||
$this->assertFalse($asset->model->fresh()->trashed());
|
$this->assertFalse($assetModel->fresh()->trashed());
|
||||||
}
|
|
||||||
|
|
||||||
public function testAdheresToMultipleFullCompanySupportScoping()
|
|
||||||
{
|
|
||||||
// TODO: Implement testAdheresToMultipleFullCompanySupportScoping() method.
|
|
||||||
|
|
||||||
$this->markTestIncomplete();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue