mirror of
https://github.com/flarum/framework.git
synced 2025-03-15 00:05:12 +08:00
test only on the hidePosts policy ability
This commit is contained in:
parent
5d1fe9b815
commit
223f4d93d4
@ -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]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user