]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix(tests): Also check that the backup status works
authorJoas Schilling <coding@schilljs.com>
Tue, 24 Sep 2024 05:00:47 +0000 (07:00 +0200)
committerJoas Schilling <coding@schilljs.com>
Wed, 25 Sep 2024 06:35:22 +0000 (08:35 +0200)
Signed-off-by: Joas Schilling <coding@schilljs.com>
apps/user_status/tests/Integration/Service/StatusServiceIntegrationTest.php

index d979960f7c2bd5957ee08d229b613ca9ee5d931a..2ed985073546054f7f01a42210da6e206b133427 100644 (file)
@@ -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(),