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

github.com/nextcloud/spreed.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2019-08-16 22:10:00 +0300
committerDaniel Calviño Sánchez <danxuliu@gmail.com>2019-09-26 11:54:28 +0300
commit41a15569570b1b1208d7a4c2221fb0a9efcb2711 (patch)
treee93619febb0594e92d15f1f64cf5aceecc53ecff /tests
parentb4a2907146daf30913208e9848a8c133b2dc666c (diff)
Correctly check if the share has a password and if it was entered correctly.
This prevents joining the room for a file shared by link and protected by password if the password has not been entered yet. Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/php/Files/UtilTest.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/php/Files/UtilTest.php b/tests/php/Files/UtilTest.php
index 7ec493463..9e332144b 100644
--- a/tests/php/Files/UtilTest.php
+++ b/tests/php/Files/UtilTest.php
@@ -29,6 +29,7 @@ use OCP\Files\Folder;
use OCP\Files\Node;
use OCP\Files\IRootFolder;
use OCP\Files\Storage\IStorage;
+use OCP\ISession;
use OCP\Share\IManager;
use PHPUnit\Framework\MockObject\MockObject;
use Test\TestCase;
@@ -94,11 +95,15 @@ class UtilTest extends TestCase {
->with($userId)
->willReturn($userFolder);
+ /** @var ISession|MockObject $session */
+ $session = $this->createMock(ISession::class);
+
/** @var IManager|MockObject $shareManager */
$shareManager = $this->createMock(IManager::class);
$util = new Util(
$rootFolder,
+ $session,
$shareManager
);
$result = $util->getGroupFolderNode($fileId, $userId);