public function testCanRespondWithErrorToAjaxViewRequestForUnallowedView()
{
$this->request = $this->prepareHttpRequest('ajax/view/unallowed', 'GET', [], 1);
$this->createService();
$this->route();
$response = _elgg_services()->responseFactory->getSentResponse();
$this->assertInstanceOf(Response::class, $response);
$this->assertEquals(ELGG_HTTP_FORBIDDEN, $response->getStatusCode());
$this->assertEquals("Ajax view 'unallowed' was not registered", $response->getContent());
}