mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-08-07 23:03:00 +03:00
Comments: Removed remaining uses of redundant 'text' field
Opened #4821 to remove the DB field in a few releases time.
This commit is contained in:
@@ -18,10 +18,10 @@ class CommentTest extends TestCase
|
||||
$resp = $this->postJson("/comment/$page->id", $comment->getAttributes());
|
||||
|
||||
$resp->assertStatus(200);
|
||||
$resp->assertSee($comment->text);
|
||||
$resp->assertSee($comment->html, false);
|
||||
|
||||
$pageResp = $this->get($page->getUrl());
|
||||
$pageResp->assertSee($comment->text);
|
||||
$pageResp->assertSee($comment->html, false);
|
||||
|
||||
$this->assertDatabaseHas('comments', [
|
||||
'local_id' => 1,
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user