A free open source IT asset/license management system
Try to fix tests
snipe4aeba2a96b51
diff --git a/tests/Feature/Assets/Ui/AuditAssetTest.php b/tests/Feature/Assets/Ui/AuditAssetTest.phpindex 8b7f49ffc5..c362823667 100644--- a/tests/Feature/Assets/Ui/AuditAssetTest.php+++ b/tests/Feature/Assets/Ui/AuditAssetTest.php@@ -10,25 +10,22 @@ class AuditAssetTest extends TestCase{public function testPermissionRequiredToCreateAssetModel(){- $asset = Asset::factory()->create();$this->actingAs(User::factory()->create())- ->get(route('clone/hardware', $asset))+ ->get(route('clone/hardware', Asset::factory()->create()))->assertForbidden();}public function testPageCanBeAccessed(): void{- $asset = Asset::factory()->create();- $response = $this->actingAs(User::factory()->auditAssets()->create())- ->get(route('asset.audit.create', $asset));- $response->assertStatus(200);+ $this->actingAs(User::factory()->auditAssets()->create())+ ->get(route('asset.audit.create', Asset::factory()->create()))+ ->assertStatus(200);}public function testAssetCanBeAudited(){- $asset = Asset::factory()->create(['name'=>'Asset to clone']);$this->actingAs(User::factory()->auditAssets()->create())- ->post(route('asset.audit.store', $asset))+ ->post(route('asset.audit.store', Asset::factory()->create()))->assertStatus(302)->assertRedirect(route('assets.audit.due'));}