diff options
Diffstat (limited to 'apps/user_status/tests')
-rw-r--r-- | apps/user_status/tests/Integration/Service/StatusServiceIntegrationTest.php | 8 | ||||
-rw-r--r-- | apps/user_status/tests/Unit/Service/PredefinedStatusServiceTest.php | 16 |
2 files changed, 18 insertions, 6 deletions
diff --git a/apps/user_status/tests/Integration/Service/StatusServiceIntegrationTest.php b/apps/user_status/tests/Integration/Service/StatusServiceIntegrationTest.php index 65b07997e82..8a21052b09f 100644 --- a/apps/user_status/tests/Integration/Service/StatusServiceIntegrationTest.php +++ b/apps/user_status/tests/Integration/Service/StatusServiceIntegrationTest.php @@ -136,7 +136,7 @@ class StatusServiceIntegrationTest extends TestCase { ); $this->service->setUserStatus( 'test123', - IUserStatus::AWAY, + IUserStatus::BUSY, IUserStatus::MESSAGE_CALENDAR_BUSY, true, ); @@ -147,12 +147,12 @@ class StatusServiceIntegrationTest extends TestCase { $this->service->setUserStatus( 'test123', - IUserStatus::AWAY, + IUserStatus::BUSY, IUserStatus::MESSAGE_CALL, true, ); self::assertSame( - IUserStatus::AWAY, + IUserStatus::BUSY, $this->service->findByUserId('test123')->getStatus(), ); @@ -182,7 +182,7 @@ class StatusServiceIntegrationTest extends TestCase { $nostatus = $this->service->setUserStatus( 'test123', - IUserStatus::AWAY, + IUserStatus::BUSY, IUserStatus::MESSAGE_CALENDAR_BUSY, true, ); diff --git a/apps/user_status/tests/Unit/Service/PredefinedStatusServiceTest.php b/apps/user_status/tests/Unit/Service/PredefinedStatusServiceTest.php index de5d92055f1..78e4a18d9f1 100644 --- a/apps/user_status/tests/Unit/Service/PredefinedStatusServiceTest.php +++ b/apps/user_status/tests/Unit/Service/PredefinedStatusServiceTest.php @@ -26,7 +26,7 @@ class PredefinedStatusServiceTest extends TestCase { } public function testGetDefaultStatuses(): void { - $this->l10n->expects($this->exactly(7)) + $this->l10n->expects($this->exactly(8)) ->method('t') ->willReturnCallback(function ($text, $parameters = []) { return vsprintf($text, $parameters); @@ -53,6 +53,15 @@ class PredefinedStatusServiceTest extends TestCase { ], ], [ + 'id' => 'be-right-back', + 'icon' => '⏳', + 'message' => 'Be right back', + 'clearAt' => [ + 'type' => 'period', + 'time' => 900, + ], + ], + [ 'id' => 'remote-work', 'icon' => '🏡', 'message' => 'Working remotely', @@ -106,6 +115,7 @@ class PredefinedStatusServiceTest extends TestCase { ['sick-leave', '🤒'], ['vacationing', '🌴'], ['remote-work', '🏡'], + ['be-right-back', '⏳'], ['call', '💬'], ['unknown-id', null], ]; @@ -127,6 +137,7 @@ class PredefinedStatusServiceTest extends TestCase { ['sick-leave', 'Out sick'], ['vacationing', 'Vacationing'], ['remote-work', 'Working remotely'], + ['be-right-back', 'Be right back'], ['call', 'In a call'], ['unknown-id', null], ]; @@ -145,13 +156,14 @@ class PredefinedStatusServiceTest extends TestCase { ['sick-leave', true], ['vacationing', true], ['remote-work', true], + ['be-right-back', true], ['call', true], ['unknown-id', false], ]; } public function testGetDefaultStatusById(): void { - $this->l10n->expects($this->exactly(7)) + $this->l10n->expects($this->exactly(8)) ->method('t') ->willReturnCallback(function ($text, $parameters = []) { return vsprintf($text, $parameters); |