From f1bf9fcf5c7238f0c0fbc47c2b6b14528bccc923 Mon Sep 17 00:00:00 2001 From: Marcus Moore Date: Thu, 20 Feb 2025 12:51:08 -0800 Subject: [PATCH] Implement test --- app/Http/Controllers/NotesController.php | 2 ++ tests/Feature/Notes/CreateNotesTest.php | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/NotesController.php b/app/Http/Controllers/NotesController.php index 8a73b80e2e..ecac627c0f 100644 --- a/app/Http/Controllers/NotesController.php +++ b/app/Http/Controllers/NotesController.php @@ -12,6 +12,8 @@ class NotesController extends Controller { public function store(Request $request) { + $this->authorize('update', Asset::class); + $validated = $request->validate([ 'id' => 'required', 'note' => 'required|string|max:500', diff --git a/tests/Feature/Notes/CreateNotesTest.php b/tests/Feature/Notes/CreateNotesTest.php index 84c8ec34bf..dedcabf0f7 100644 --- a/tests/Feature/Notes/CreateNotesTest.php +++ b/tests/Feature/Notes/CreateNotesTest.php @@ -10,8 +10,6 @@ class CreateNotesTest extends TestCase { public function testRequiresPermission() { - $this->markTestIncomplete(); - $this->actingAs(User::factory()->create()) ->post(route('notes.store')) ->assertForbidden();