From 223f4d93d4301ac3c2fbcbdd96309bcc20720413 Mon Sep 17 00:00:00 2001 From: Daniel Klabbers Date: Thu, 21 Nov 2019 11:47:01 +0100 Subject: [PATCH] test only on the hidePosts policy ability --- .../api/Controller/ShowDiscussionControllerTest.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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]);