summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2015-04-08 13:53:22 +0200
committerRobin Appelman <icewind@owncloud.com>2015-04-27 14:07:15 +0200
commitb5c62cdad640ca9d0c2c184a61f9f0d683f22509 (patch)
tree76d702df1bb80b5df54302bf47ad98a7d7e18616 /apps/files_sharing
parent19486837b2bc135a8f083ff97d477eb5d6314d42 (diff)
downloadnextcloud-server-b5c62cdad640ca9d0c2c184a61f9f0d683f22509.tar.gz
nextcloud-server-b5c62cdad640ca9d0c2c184a61f9f0d683f22509.zip
remove duplicates from rebase
Diffstat (limited to 'apps/files_sharing')
-rw-r--r--apps/files_sharing/tests/propagation.php48
1 files changed, 0 insertions, 48 deletions
diff --git a/apps/files_sharing/tests/propagation.php b/apps/files_sharing/tests/propagation.php
index c42dccce88f..1949f7808a4 100644
--- a/apps/files_sharing/tests/propagation.php
+++ b/apps/files_sharing/tests/propagation.php
@@ -242,52 +242,4 @@ class Propagation extends TestCase {
$newRootInfo = $view1->getFileInfo('');
$this->assertNotEquals($rootInfo->getEtag(), $newRootInfo->getEtag());
}
-
- public function testSizePropagationWhenOwnerChangesFile() {
- /**
- * @var \OC\Files\View $recipientView
- * @var \OC\Files\View $ownerView
- */
- list($recipientView, $ownerView) = $this->setupViews();
- $sharedFolderInfo = $ownerView->getFileInfo('/sharedfolder', false);
- \OCP\Share::shareItem('folder', $sharedFolderInfo->getId(), \OCP\Share::SHARE_TYPE_USER, self::TEST_FILES_SHARING_API_USER1, 31);
- $ownerRootInfo = $ownerView->getFileInfo('', false);
- $this->loginAsUser(self::TEST_FILES_SHARING_API_USER1);
- $this->assertTrue($recipientView->file_exists('/sharedfolder/subfolder/foo.txt'));
- $recipientRootInfo = $recipientView->getFileInfo('', false);
- // when file changed as owner
- $this->loginAsUser(self::TEST_FILES_SHARING_API_USER2);
- $ownerView->file_put_contents('/sharedfolder/subfolder/foo.txt', 'foobar');
- // size of recipient's root stays the same
- $this->loginAsUser(self::TEST_FILES_SHARING_API_USER1);
- $newRecipientRootInfo = $recipientView->getFileInfo('', false);
- $this->assertEquals($recipientRootInfo->getSize(), $newRecipientRootInfo->getSize());
- // size of owner's root increases
- $this->loginAsUser(self::TEST_FILES_SHARING_API_USER2);
- $newOwnerRootInfo = $ownerView->getFileInfo('', false);
- $this->assertEquals($ownerRootInfo->getSize() + 3, $newOwnerRootInfo->getSize());
- }
-
- public function testSizePropagationWhenRecipientChangesFile() {
- /**
- * @var \OC\Files\View $recipientView
- * @var \OC\Files\View $ownerView
- */
- list($recipientView, $ownerView) = $this->setupViews();
- $sharedFolderInfo = $ownerView->getFileInfo('/sharedfolder', false);
- \OCP\Share::shareItem('folder', $sharedFolderInfo->getId(), \OCP\Share::SHARE_TYPE_USER, self::TEST_FILES_SHARING_API_USER1, 31);
- $ownerRootInfo = $ownerView->getFileInfo('', false);
- $this->loginAsUser(self::TEST_FILES_SHARING_API_USER1);
- $this->assertTrue($recipientView->file_exists('/sharedfolder/subfolder/foo.txt'));
- $recipientRootInfo = $recipientView->getFileInfo('', false);
- // when file changed as recipient
- $recipientView->file_put_contents('/sharedfolder/subfolder/foo.txt', 'foobar');
- // size of recipient's root stays the same
- $newRecipientRootInfo = $recipientView->getFileInfo('', false);
- $this->assertEquals($recipientRootInfo->getSize(), $newRecipientRootInfo->getSize());
- // size of owner's root increases
- $this->loginAsUser(self::TEST_FILES_SHARING_API_USER2);
- $newOwnerRootInfo = $ownerView->getFileInfo('', false);
- $this->assertEquals($ownerRootInfo->getSize() + 3, $newOwnerRootInfo->getSize());
- }
}