From 134bfb8437c5e78026e29673a937ec3b9e322b6a Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 24 Sep 2024 07:00:47 +0200 Subject: fix(tests): Also check that the backup status works Signed-off-by: Joas Schilling --- .../Integration/Service/StatusServiceIntegrationTest.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/apps/user_status/tests/Integration/Service/StatusServiceIntegrationTest.php b/apps/user_status/tests/Integration/Service/StatusServiceIntegrationTest.php index d979960f7c2..2ed98507354 100644 --- a/apps/user_status/tests/Integration/Service/StatusServiceIntegrationTest.php +++ b/apps/user_status/tests/Integration/Service/StatusServiceIntegrationTest.php @@ -98,15 +98,27 @@ class StatusServiceIntegrationTest extends TestCase { '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(), -- cgit v1.2.3