Add API tests to cover usage of orphan visits restricted keys

This commit is contained in:
Alejandro Celaya
2023-05-31 09:22:40 +02:00
parent eaba5edf7f
commit be26dd58c3
8 changed files with 52 additions and 16 deletions

View File

@@ -48,7 +48,7 @@ class VisitsDeleterTest extends TestCase
$this->repo->expects($this->never())->method('deleteOrphanVisits');
$result = $this->visitsDeleter->deleteOrphanVisits(
ApiKey::fromMeta(ApiKeyMeta::withRoles(RoleDefinition::forOrphanVisitsExcluded())),
ApiKey::fromMeta(ApiKeyMeta::withRoles(RoleDefinition::forNoOrphanVisits())),
);
self::assertEquals(0, $result->affectedItems);