public function testShouldAuthorizeParentResourceInCollectionAction()
{
$this->params['action'] = "index";
$this->setProperty($this->controller, 'category', 'some_category');
$this->controller->shouldReceive('authorize')->once()->with('show', 'some_category')->andThrow('Efficiently\\AuthorityController\\Exceptions\\AccessDenied');
$resource = new Efficiently\AuthorityController\ControllerResource($this->controller, 'category', ['parent' => true]);
$resource->authorizeResource();
}