API improvements (#1826)

This commit is contained in:
Kevin Papst
2020-07-17 20:30:16 +02:00
committed by GitHub
parent 5864c7e127
commit c843dba29a
77 changed files with 1745 additions and 1189 deletions

View File

@@ -192,6 +192,15 @@ trait RateControllerTestTrait
$this->assertNotFoundForDelete($client, $this->getRateUrl(2, 1));
}
public function testDeleteNotAllowed()
{
$client = $this->getClientForAuthenticatedUser(User::ROLE_USER);
$this->importTestRates(1);
$this->request($client, $this->getRateUrl(1, 1), 'DELETE');
$this->assertApiResponseAccessDenied($client->getResponse(), 'Access denied.');
}
protected function assertRateStructure(array $result, $user = null)
{
$expectedKeys = [