diff options
author | Joas Schilling <coding@schilljs.com> | 2019-08-16 22:10:00 +0300 |
---|---|---|
committer | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2019-09-26 11:54:28 +0300 |
commit | 41a15569570b1b1208d7a4c2221fb0a9efcb2711 (patch) | |
tree | e93619febb0594e92d15f1f64cf5aceecc53ecff /tests | |
parent | b4a2907146daf30913208e9848a8c133b2dc666c (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.php | 5 |
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); |