summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2016-10-20 20:44:05 +0200
committerGitHub <noreply@github.com>2016-10-20 20:44:05 +0200
commitd9aeee2aa1f2d47c950a4e053a47b38a040b62b5 (patch)
tree7b98aebc73eef78cddaaa7234ef0e55691c64509 /apps
parentc7ba73e6f48b3a69b4f692c739b8c53e18735235 (diff)
parentd4976e55544ddab17713e2f3aa4f5f5f5eb9986f (diff)
downloadnextcloud-server-d9aeee2aa1f2d47c950a4e053a47b38a040b62b5.tar.gz
nextcloud-server-d9aeee2aa1f2d47c950a4e053a47b38a040b62b5.zip
Merge pull request #1826 from nextcloud/downstream-26391
Fix post_unshareFromSelf hook parameter format
Diffstat (limited to 'apps')
-rw-r--r--apps/files_sharing/tests/GroupEtagPropagationTest.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/apps/files_sharing/tests/GroupEtagPropagationTest.php b/apps/files_sharing/tests/GroupEtagPropagationTest.php
index eeb3c06bc59..e339983b404 100644
--- a/apps/files_sharing/tests/GroupEtagPropagationTest.php
+++ b/apps/files_sharing/tests/GroupEtagPropagationTest.php
@@ -122,4 +122,26 @@ class GroupEtagPropagationTest extends PropagationTestCase {
$this->assertAllUnchanged();
}
+
+ public function testRecipientUnsharesFromSelf() {
+ $this->loginAsUser(self::TEST_FILES_SHARING_API_USER2);
+ $this->assertTrue(
+ $this->rootView->unlink('/' . self::TEST_FILES_SHARING_API_USER2 . '/files/test')
+ );
+ $this->assertEtagsChanged([self::TEST_FILES_SHARING_API_USER2]);
+
+ $this->assertAllUnchanged();
+ }
+
+ public function testRecipientUnsharesFromSelfUniqueGroupShare() {
+ $this->loginAsUser(self::TEST_FILES_SHARING_API_USER2);
+ // rename to create an extra entry in the share table
+ $this->rootView->rename('/' . self::TEST_FILES_SHARING_API_USER2 . '/files/test', '/' . self::TEST_FILES_SHARING_API_USER2 . '/files/test_renamed');
+ $this->assertTrue(
+ $this->rootView->unlink('/' . self::TEST_FILES_SHARING_API_USER2 . '/files/test_renamed')
+ );
+ $this->assertEtagsChanged([self::TEST_FILES_SHARING_API_USER2]);
+
+ $this->assertAllUnchanged();
+ }
}