Skip to content

Commit

Permalink
fix(tests): Also check that the backup status works
Browse files Browse the repository at this point in the history
Signed-off-by: Joas Schilling <coding@schilljs.com>
  • Loading branch information
nickvergessen committed Sep 24, 2024
1 parent fa969b7 commit 4626f5e
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,15 @@ 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',
Expand All @@ -111,6 +116,12 @@ public function testCreateRestoreBackupAutomatically(): void {
IUserStatus::ONLINE,
$this->service->findByUserId('test123')->getStatus(),
);

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

public function testCallOverwritesMeetingStatus(): void {
Expand Down

0 comments on commit 4626f5e

Please sign in to comment.