diff options
Diffstat (limited to 'apps/files_sharing/tests')
-rw-r--r-- | apps/files_sharing/tests/GroupEtagPropagationTest.php | 22 |
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(); + } } |