diff options
author | Joas Schilling <coding@schilljs.com> | 2024-09-24 07:00:47 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2024-09-25 08:35:22 +0200 |
commit | 134bfb8437c5e78026e29673a937ec3b9e322b6a (patch) | |
tree | ccf2b7966b8d4e01eeb67667129fddb9fdbcfbbc /apps/user_status/tests | |
parent | ec6ed0cf742a5e72fe1bdd135274af9aef1b2534 (diff) | |
download | nextcloud-server-134bfb8437c5e78026e29673a937ec3b9e322b6a.tar.gz nextcloud-server-134bfb8437c5e78026e29673a937ec3b9e322b6a.zip |
fix(tests): Also check that the backup status works
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps/user_status/tests')
-rw-r--r-- | apps/user_status/tests/Integration/Service/StatusServiceIntegrationTest.php | 12 |
1 files changed, 12 insertions, 0 deletions
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(), |