0
0
Fork 0
mirror of https://github.com/kevinpapst/kimai2.git synced 2025-05-05 01:30:23 +00:00

added tests for new API endpoints

This commit is contained in:
Kevin Papst 2024-11-27 14:44:00 +01:00
parent a16c62639a
commit d2b4ea3e4b
3 changed files with 15 additions and 0 deletions

View file

@ -454,6 +454,11 @@ class ActivityControllerTest extends APIControllerBaseTest
// ------------------------------- [DELETE] -------------------------------
public function testDeleteIsSecure(): void
{
$this->assertUrlIsSecured('/api/activities/1', Request::METHOD_DELETE);
}
public function testDeleteActionWithUnknownTimesheet(): void
{
$client = $this->getClientForAuthenticatedUser(User::ROLE_ADMIN);

View file

@ -436,6 +436,11 @@ class CustomerControllerTest extends APIControllerBaseTest
// ------------------------------- [DELETE] -------------------------------
public function testDeleteIsSecure(): void
{
$this->assertUrlIsSecured('/api/customers/1', Request::METHOD_DELETE);
}
public function testDeleteActionWithUnknownTimesheet(): void
{
$client = $this->getClientForAuthenticatedUser(User::ROLE_ADMIN);

View file

@ -613,6 +613,11 @@ class ProjectControllerTest extends APIControllerBaseTest
// ------------------------------- [DELETE] -------------------------------
public function testDeleteIsSecure(): void
{
$this->assertUrlIsSecured('/api/projects/1', Request::METHOD_DELETE);
}
public function testDeleteActionWithUnknownTimesheet(): void
{
$client = $this->getClientForAuthenticatedUser(User::ROLE_ADMIN);