From c155e4a7c9f9fc647571578886a062cb2150c05b Mon Sep 17 00:00:00 2001 From: spencerrlongg Date: Wed, 20 Mar 2024 13:52:22 -0500 Subject: [PATCH] new test for not found assets --- tests/Feature/Api/Assets/AssetUpdateTest.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/Feature/Api/Assets/AssetUpdateTest.php b/tests/Feature/Api/Assets/AssetUpdateTest.php index 9cec103628..bea962b153 100644 --- a/tests/Feature/Api/Assets/AssetUpdateTest.php +++ b/tests/Feature/Api/Assets/AssetUpdateTest.php @@ -20,6 +20,13 @@ class AssetUpdateTest extends TestCase { use InteractsWithSettings; + public function testThatANonExistentAssetIdReturnsError() + { + $this->actingAsForApi(User::factory()->editAssets()->createAssets()->create()) + ->patchJson(route('api.assets.update', 123456789)) + ->assertStatusMessageIs('error'); + } + public function testRequiresPermissionToUpdateAsset() { $asset = Asset::factory()->create();