mirror of
https://github.com/flarum/core.git
synced 2025-05-09 08:55:25 +02:00
test only on the hidePosts policy ability
This commit is contained in:
parent
6d10dbe9af
commit
213045aa03
@ -117,7 +117,9 @@ class ShowDiscussionControllerTest extends ApiControllerTestCase
|
|||||||
$events = app(Dispatcher::class);
|
$events = app(Dispatcher::class);
|
||||||
|
|
||||||
$events->listen(ScopeModelVisibility::class, function (ScopeModelVisibility $event) {
|
$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]);
|
$response = $this->callWith([], ['id' => 4]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user