$editor = $this->users->editor();
$book = $this->entities->book();
- $this->actingAs($editor)->get($book->getUrl());
- $resp = $this->put('/watching/update', [
+ $resp = $this->actingAs($editor)->put('/watching/update', [
'type' => $book->getMorphClass(),
'id' => $book->id,
'level' => 'comments'
$notifications = Notification::fake();
$this->asAdmin()->post("/comment/{$entities['page']->id}", [
- 'text' => 'My new comment'
+ 'html' => '<p>My new comment</p>'
]);
$notifications->assertSentTo($editor, CommentCreationNotification::class);
}
$notifications = Notification::fake();
$this->actingAs($editor)->post("/comment/{$entities['page']->id}", [
- 'text' => 'My new comment'
+ 'html' => '<p>My new comment</p>'
]);
$comment = $entities['page']->comments()->orderBy('id', 'desc')->first();
$this->asAdmin()->post("/comment/{$entities['page']->id}", [
- 'text' => 'My new comment response',
+ 'html' => '<p>My new comment response</p>',
'parent_id' => $comment->local_id,
]);
$notifications->assertSentTo($editor, CommentCreationNotification::class);
// Comment post
$this->actingAs($admin)->post("/comment/{$entities['page']->id}", [
- 'text' => 'My new comment response',
+ 'html' => '<p>My new comment response</p>',
]);
$notifications->assertSentTo($editor, function (CommentCreationNotification $notification) use ($editor, $admin, $entities) {
$this->permissions->disableEntityInheritedPermissions($page);
$this->asAdmin()->post("/comment/{$page->id}", [
- 'text' => 'My new comment response',
+ 'html' => '<p>My new comment response</p>',
])->assertOk();
$notifications->assertNothingSentTo($editor);