]> BookStack Code Mirror - bookstack/blobdiff - tests/Permissions/RolePermissionsTest.php
Comments: Removed remaining uses of redundant 'text' field
[bookstack] / tests / Permissions / RolePermissionsTest.php
index ccb158faf5f3859fc59185f1861d1d5310ccd278..d3146bd47bd9e838384886a17aae4dced9000563 100644 (file)
@@ -738,16 +738,12 @@ class RolePermissionsTest extends TestCase
 
     private function addComment(Page $page): TestResponse
     {
-        $comment = Comment::factory()->make();
-
-        return $this->postJson("/comment/$page->id", $comment->only('text', 'html'));
+        return $this->postJson("/comment/$page->id", ['html' => '<p>New comment content</p>']);
     }
 
     private function updateComment(Comment $comment): TestResponse
     {
-        $commentData = Comment::factory()->make();
-
-        return $this->putJson("/comment/{$comment->id}", $commentData->only('text', 'html'));
+        return $this->putJson("/comment/{$comment->id}", ['html' => '<p>Updated comment content</p>']);
     }
 
     private function deleteComment(Comment $comment): TestResponse