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:
parent
a16c62639a
commit
d2b4ea3e4b
3 changed files with 15 additions and 0 deletions
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue