diff --git a/framework/core/tests/integration/api/Controller/ShowDiscussionControllerTest.php b/framework/core/tests/integration/api/Controller/ShowDiscussionControllerTest.php index eb6b35146..c811dc3bb 100644 --- a/framework/core/tests/integration/api/Controller/ShowDiscussionControllerTest.php +++ b/framework/core/tests/integration/api/Controller/ShowDiscussionControllerTest.php @@ -117,7 +117,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]);