public function test_users_can_be_constrained_to_a_model_blanket_ability() { $bouncer = $this->bouncer($user = User::create()); $bouncer->allow('admin')->to('ban', User::class); $bouncer->allow('moderator')->to('ban', $user); $roles = Role::whereCan('ban', User::class)->get(); $this->assertCount(1, $roles); $this->assertEquals('admin', $roles->first()->name); }