aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/tests/Controller/ApiControllerTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files/tests/Controller/ApiControllerTest.php')
-rw-r--r--apps/files/tests/Controller/ApiControllerTest.php15
1 files changed, 4 insertions, 11 deletions
diff --git a/apps/files/tests/Controller/ApiControllerTest.php b/apps/files/tests/Controller/ApiControllerTest.php
index 0c9d7a4fa6e..d6d86e293fd 100644
--- a/apps/files/tests/Controller/ApiControllerTest.php
+++ b/apps/files/tests/Controller/ApiControllerTest.php
@@ -29,7 +29,6 @@ use OCP\IPreview;
use OCP\IRequest;
use OCP\IUser;
use OCP\IUserSession;
-use OCP\Share\IAttributes;
use OCP\Share\IManager;
use OCP\Share\IShare;
use PHPUnit\Framework\MockObject\MockObject;
@@ -183,16 +182,10 @@ class ApiControllerTest extends TestCase {
}
public function testGetThumbnailSharedNoDownload(): void {
- $attributes = $this->createMock(IAttributes::class);
- $attributes->expects(self::once())
- ->method('getAttribute')
- ->with('permissions', 'download')
- ->willReturn(false);
-
$share = $this->createMock(IShare::class);
$share->expects(self::once())
- ->method('getAttributes')
- ->willReturn($attributes);
+ ->method('canSeeContent')
+ ->willReturn(false);
$storage = $this->createMock(ISharedStorage::class);
$storage->expects(self::once())
@@ -221,8 +214,8 @@ class ApiControllerTest extends TestCase {
public function testGetThumbnailShared(): void {
$share = $this->createMock(IShare::class);
$share->expects(self::once())
- ->method('getAttributes')
- ->willReturn(null);
+ ->method('canSeeContent')
+ ->willReturn(true);
$storage = $this->createMock(ISharedStorage::class);
$storage->expects(self::once())