aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav/tests
diff options
context:
space:
mode:
authorskjnldsv <skjnldsv@protonmail.com>2024-06-06 18:55:33 +0200
committerskjnldsv <skjnldsv@protonmail.com>2024-06-12 10:27:29 +0200
commit4a77fe3530d3213a2700b8ecdc1ccf3b4195b41a (patch)
tree768e11fc630481073127dd10ee61c6f18cd2a646 /apps/dav/tests
parentfb11672df6f05a502549c596b5f5443988bb5edb (diff)
downloadnextcloud-server-4a77fe3530d3213a2700b8ecdc1ccf3b4195b41a.tar.gz
nextcloud-server-4a77fe3530d3213a2700b8ecdc1ccf3b4195b41a.zip
fix(dav): also return shared-with-me shares data
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/dav/tests')
-rw-r--r--apps/dav/tests/unit/Connector/Sabre/SharesPluginTest.php22
1 files changed, 21 insertions, 1 deletions
diff --git a/apps/dav/tests/unit/Connector/Sabre/SharesPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/SharesPluginTest.php
index 79f773e42f8..546be840cd8 100644
--- a/apps/dav/tests/unit/Connector/Sabre/SharesPluginTest.php
+++ b/apps/dav/tests/unit/Connector/Sabre/SharesPluginTest.php
@@ -97,7 +97,7 @@ class SharesPluginTest extends \Test\TestCase {
->with(
$this->equalTo('user1'),
$this->anything(),
- $this->anything(),
+ $this->equalTo($node),
$this->equalTo(false),
$this->equalTo(-1)
)
@@ -111,6 +111,16 @@ class SharesPluginTest extends \Test\TestCase {
return [];
});
+ $this->shareManager->expects($this->any())
+ ->method('getSharedWith')
+ ->with(
+ $this->equalTo('user1'),
+ $this->anything(),
+ $this->equalTo($node),
+ $this->equalTo(-1)
+ )
+ ->willReturn([]);
+
$propFind = new \Sabre\DAV\PropFind(
'/dummyPath',
[self::SHARETYPES_PROPERTYNAME],
@@ -200,6 +210,16 @@ class SharesPluginTest extends \Test\TestCase {
});
$this->shareManager->expects($this->any())
+ ->method('getSharedWith')
+ ->with(
+ $this->equalTo('user1'),
+ $this->anything(),
+ $this->equalTo($node),
+ $this->equalTo(-1)
+ )
+ ->willReturn([]);
+
+ $this->shareManager->expects($this->any())
->method('getSharesInFolder')
->with(
$this->equalTo('user1'),