Skip to content

Commit e95fb81

Browse files
committed
fixup! fix: remove UserStatusAutomation for deleted users
Signed-off-by: Salvatore Martire <4652631+salmart-dev@users.noreply.github.com>
1 parent 2255bf3 commit e95fb81

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

apps/dav/tests/unit/BackgroundJob/UserStatusAutomationTest.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,4 +219,16 @@ public function testRunNoAvailabilityWithOOO(): void {
219219

220220
self::invokePrivate($automation, 'run', [['userId' => 'user']]);
221221
}
222+
223+
public function testRunWithDeletedUser(): void {
224+
$this->userManager->expects(self::once())
225+
->method('get')
226+
->willReturn(null);
227+
$this->logger->expects(self::exactly(1))
228+
->method('info');
229+
$this->jobList->expects(self::once())
230+
->method('remove');
231+
$automation = $this->getAutomationMock([]);
232+
self::invokePrivate($automation, 'run', [['userId' => 'user']]);
233+
}
222234
}

0 commit comments

Comments
 (0)