Skip to content
Prev Previous commit
Next Next commit
fix(tests): Also check that the backup status works
Signed-off-by: Joas Schilling <[email protected]>
  • Loading branch information
nickvergessen committed Sep 25, 2024
commit cd27ba7e54f15faca08030d8fbe1ce1f57248d82
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,27 @@ public function testCreateRestoreBackupAutomatically(): void {
'meeting',
true,
);

self::assertSame(
'meeting',
$this->service->findByUserId('test123')->getMessageId(),
);
self::assertSame(
IUserStatus::ONLINE,
$this->service->findByUserId('_test123')->getStatus(),
);

$this->service->revertUserStatus(
'test123',
'meeting',
);

try {
$this->service->findByUserId('_test123');
$this->fail('Expected DoesNotExistException() to be thrown when finding backup status after reverting');
} catch (DoesNotExistException) {
}

self::assertSame(
IUserStatus::ONLINE,
$this->service->findByUserId('test123')->getStatus(),
Expand Down