summaryrefslogtreecommitdiffstats
path: root/apps/federatedfilesharing/tests
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2017-04-11 12:40:36 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2017-04-13 12:58:52 +0200
commit629b7c0fc38d9a2c33805bfcf4359e263e4ae68f (patch)
tree915d48dcfbc021fad3cbff2a5c53e7de006e630e /apps/federatedfilesharing/tests
parent6c23a5fa3511e5212c83e8407fa18b12ec975f97 (diff)
downloadnextcloud-server-629b7c0fc38d9a2c33805bfcf4359e263e4ae68f.tar.gz
nextcloud-server-629b7c0fc38d9a2c33805bfcf4359e263e4ae68f.zip
Adjust docs and make !$currentAccess simpler
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps/federatedfilesharing/tests')
-rw-r--r--apps/federatedfilesharing/tests/FederatedShareProviderTest.php11
1 files changed, 10 insertions, 1 deletions
diff --git a/apps/federatedfilesharing/tests/FederatedShareProviderTest.php b/apps/federatedfilesharing/tests/FederatedShareProviderTest.php
index 788ae47fded..e01e02c83ba 100644
--- a/apps/federatedfilesharing/tests/FederatedShareProviderTest.php
+++ b/apps/federatedfilesharing/tests/FederatedShareProviderTest.php
@@ -805,6 +805,12 @@ class FederatedShareProviderTest extends \Test\TestCase {
->method('sendRemoteShare')
->willReturn(true);
+ $result = $this->provider->getAccessList([$file1], true);
+ $this->assertEquals(['remote' => []], $result);
+
+ $result = $this->provider->getAccessList([$file1], false);
+ $this->assertEquals(['remote' => false], $result);
+
$share1 = $this->shareManager->newShare();
$share1->setSharedWith('user@server.com')
->setSharedBy($u1->getUID())
@@ -822,7 +828,6 @@ class FederatedShareProviderTest extends \Test\TestCase {
$this->provider->create($share2);
$result = $this->provider->getAccessList([$file1], true);
-
$this->assertEquals(['remote' => [
'user@server.com' => [
'token' => 'token1',
@@ -833,6 +838,10 @@ class FederatedShareProviderTest extends \Test\TestCase {
'node_id' => $file1->getId(),
],
]], $result);
+
+ $result = $this->provider->getAccessList([$file1], false);
+ $this->assertEquals(['remote' => true], $result);
+
$u1->delete();
}
}