summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/tests/SharedMountTest.php
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2019-11-19 16:09:26 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2019-11-20 08:08:02 +0100
commite9c972f708e4058deee8ebd2ee9c2e47380aab9c (patch)
tree4fd61beaae0d584e2aa7bfb106a8b9be77824e36 /apps/files_sharing/tests/SharedMountTest.php
parentb367027798e1d666ae847453b1ce6faa89895a36 (diff)
downloadnextcloud-server-e9c972f708e4058deee8ebd2ee9c2e47380aab9c.tar.gz
nextcloud-server-e9c972f708e4058deee8ebd2ee9c2e47380aab9c.zip
Fix share tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/files_sharing/tests/SharedMountTest.php')
-rw-r--r--apps/files_sharing/tests/SharedMountTest.php16
1 files changed, 13 insertions, 3 deletions
diff --git a/apps/files_sharing/tests/SharedMountTest.php b/apps/files_sharing/tests/SharedMountTest.php
index 1eddbcb64f7..f01e9896efb 100644
--- a/apps/files_sharing/tests/SharedMountTest.php
+++ b/apps/files_sharing/tests/SharedMountTest.php
@@ -87,6 +87,7 @@ class SharedMountTest extends TestCase {
self::TEST_FILES_SHARING_API_USER1,
self::TEST_FILES_SHARING_API_USER2,
\OCP\Constants::PERMISSION_ALL);
+ $this->shareManager->acceptShare($share, self::TEST_FILES_SHARING_API_USER2);
$share->setTarget('/foo/bar' . $this->folder);
$this->shareManager->moveShare($share, self::TEST_FILES_SHARING_API_USER2);
@@ -200,6 +201,9 @@ class SharedMountTest extends TestCase {
'testGroup',
\OCP\Constants::PERMISSION_READ | \OCP\Constants::PERMISSION_UPDATE | \OCP\Constants::PERMISSION_SHARE
);
+ $this->shareManager->acceptShare($share, $user1->getUID());
+ $this->shareManager->acceptShare($share, $user2->getUID());
+ $this->shareManager->acceptShare($share, $user3->getUID());
self::loginHelper(self::TEST_FILES_SHARING_API_USER2);
@@ -284,7 +288,7 @@ class SharedMountTest extends TestCase {
if ($before === $after) { continue; }
$data[] = [
- 'file',
+ 'file',
$before,
$after,
];
@@ -348,6 +352,9 @@ class SharedMountTest extends TestCase {
'testGroup',
$beforePerm
);
+ $this->shareManager->acceptShare($share, $user1->getUID());
+ $this->shareManager->acceptShare($share, $user2->getUID());
+ $this->shareManager->acceptShare($share, $user3->getUID());
// Login as user 2 and verify the item exists
self::loginHelper(self::TEST_FILES_SHARING_API_USER2);
@@ -386,7 +393,7 @@ class SharedMountTest extends TestCase {
}
/**
- * If the permissions on a group share are upgraded be sure to still respect
+ * If the permissions on a group share are upgraded be sure to still respect
* removed shares by a member of that group
*/
public function testPermissionUpgradeOnUserDeletedGroupShare() {
@@ -409,6 +416,9 @@ class SharedMountTest extends TestCase {
'testGroup',
\OCP\Constants::PERMISSION_READ
);
+ $this->shareManager->acceptShare($share, $user1->getUID());
+ $this->shareManager->acceptShare($share, $user2->getUID());
+ $this->shareManager->acceptShare($share, $user3->getUID());
// Login as user 2 and verify the item exists
self::loginHelper(self::TEST_FILES_SHARING_API_USER2);
@@ -430,7 +440,7 @@ class SharedMountTest extends TestCase {
$share->setPermissions(\OCP\Constants::PERMISSION_ALL);
$share = $this->shareManager->updateShare($share);
- // Login as user 2 and verify
+ // Login as user 2 and verify
self::loginHelper(self::TEST_FILES_SHARING_API_USER2);
$this->assertFalse(\OC\Files\Filesystem::file_exists($this->folder));
$result = $this->shareManager->getShareById($share->getFullId(), self::TEST_FILES_SHARING_API_USER2);