Skip to content

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
marcusmoore committed Sep 12, 2024
1 parent 2044570 commit 0ec415d
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions tests/Feature/AssetModels/Api/DeleteAssetModelsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@
use App\Models\Asset;
use App\Models\AssetModel;
use App\Models\User;
use Tests\Concerns\TestsMultipleFullCompanySupport;
use Tests\Concerns\TestsPermissionsRequirement;
use Tests\TestCase;

class DeleteAssetModelsTest extends TestCase implements TestsMultipleFullCompanySupport, TestsPermissionsRequirement
class DeleteAssetModelsTest extends TestCase implements TestsPermissionsRequirement
{
public function testRequiresPermission()
{
Expand All @@ -33,19 +32,12 @@ public function testCanDeleteAssetModel()

public function testCannotDeleteAssetModelThatStillHasAssociatedAssets()
{
$asset = Asset::factory()->create();
$assetModel = Asset::factory()->create()->model;

$this->actingAsForApi(User::factory()->deleteAssetModels()->create())
->deleteJson(route('api.models.destroy', $asset->model))
->deleteJson(route('api.models.destroy', $assetModel))
->assertStatusMessageIs('error');

$this->assertFalse($asset->model->fresh()->trashed());
}

public function testAdheresToMultipleFullCompanySupportScoping()
{
// TODO: Implement testAdheresToMultipleFullCompanySupportScoping() method.

$this->markTestIncomplete();
$this->assertFalse($assetModel->fresh()->trashed());
}
}

0 comments on commit 0ec415d

Please sign in to comment.