added API route to fetch infos about installed plugins (#2561)

This commit is contained in:
Kevin Papst
2021-05-12 14:03:46 +02:00
committed by GitHub
parent f10aad927f
commit f81f9ba492
8 changed files with 168 additions and 5 deletions

View File

@@ -27,6 +27,11 @@ class StatusControllerTest extends APIControllerBaseTest
$this->assertUrlIsSecured('/api/version');
}
public function testIsSecurePlugins()
{
$this->assertUrlIsSecured('/api/plugins');
}
public function testPing()
{
$client = $this->getClientForAuthenticatedUser(User::ROLE_USER);
@@ -62,4 +67,13 @@ class StatusControllerTest extends APIControllerBaseTest
$result['copyright']
);
}
public function testPlugins()
{
$client = $this->getClientForAuthenticatedUser(User::ROLE_USER);
$this->assertAccessIsGranted($client, '/api/plugins');
$result = json_decode($client->getResponse()->getContent(), true);
$this->assertIsArray($result);
}
}