Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'apps/user_status/tests/Unit/Service/StatusServiceTest.php')
-rw-r--r--apps/user_status/tests/Unit/Service/StatusServiceTest.php16
1 files changed, 13 insertions, 3 deletions
diff --git a/apps/user_status/tests/Unit/Service/StatusServiceTest.php b/apps/user_status/tests/Unit/Service/StatusServiceTest.php
index df31cf0d5ad..413cecce595 100644
--- a/apps/user_status/tests/Unit/Service/StatusServiceTest.php
+++ b/apps/user_status/tests/Unit/Service/StatusServiceTest.php
@@ -795,24 +795,34 @@ class StatusServiceTest extends TestCase {
$backupOnly->setUserId('_backuponly');
$backupOnly->setIsBackup(true);
+ $noBackupDND = new UserStatus();
+ $noBackupDND->setId(5);
+ $noBackupDND->setStatus(IUserStatus::DND);
+ $noBackupDND->setStatusTimestamp(1337);
+ $noBackupDND->setIsUserDefined(false);
+ $noBackupDND->setMessageId('call');
+ $noBackupDND->setUserId('nobackupanddnd');
+ $noBackupDND->setIsBackup(false);
+
$this->mapper->expects($this->once())
->method('findByUserIds')
- ->with(['john', 'nobackup', 'backuponly', '_john', '_nobackup', '_backuponly'])
+ ->with(['john', 'nobackup', 'backuponly', 'nobackupanddnd', '_john', '_nobackup', '_backuponly', '_nobackupanddnd'])
->willReturn([
$john,
$johnBackup,
$noBackup,
$backupOnly,
+ $noBackupDND,
]);
$this->mapper->expects($this->once())
->method('deleteByIds')
- ->with([1, 3]);
+ ->with([1, 3, 5]);
$this->mapper->expects($this->once())
->method('restoreBackupStatuses')
->with([2]);
- $this->service->revertMultipleUserStatus(['john', 'nobackup', 'backuponly'], 'call', IUserStatus::AWAY);
+ $this->service->revertMultipleUserStatus(['john', 'nobackup', 'backuponly', 'nobackupanddnd'], 'call');
}
}