diff --git a/tests/integration/api/Controller/ShowDiscussionControllerTest.php b/tests/integration/api/Controller/ShowDiscussionControllerTest.php index 55c938523..1f8396d3a 100644 --- a/tests/integration/api/Controller/ShowDiscussionControllerTest.php +++ b/tests/integration/api/Controller/ShowDiscussionControllerTest.php @@ -115,7 +115,9 @@ class ShowDiscussionControllerTest extends ApiControllerTestCase $events = app(Dispatcher::class); $events->listen(ScopeModelVisibility::class, function (ScopeModelVisibility $event) { - $event->query->whereRaw('1=1'); + if ($event->ability === 'discussion.hidePosts') { + $event->query->whereRaw('1=1'); + } }); $response = $this->callWith([], ['id' => 4]);