From fb0fef78f46563fad4400d18a15a270fb4b47c24 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Thu, 30 Apr 2015 13:02:04 +0200 Subject: Add test case when owner renames shared folder --- apps/files_sharing/tests/share.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'apps') diff --git a/apps/files_sharing/tests/share.php b/apps/files_sharing/tests/share.php index ec0e21fbf80..a34f4f4e630 100644 --- a/apps/files_sharing/tests/share.php +++ b/apps/files_sharing/tests/share.php @@ -342,12 +342,15 @@ class Test_Files_Sharing extends OCA\Files_sharing\Tests\TestCase { null, \OCP\Constants::PERMISSION_READ); $this->assertNotNull($result); // returns the token! + // owner renames after sharing + $this->view->rename($this->folder, $this->folder . '_owner_renamed'); + self::loginHelper(self::TEST_FILES_SHARING_API_USER2); $user2View = new \OC\Files\View('/' . self::TEST_FILES_SHARING_API_USER2 . '/files'); $user2View->rename($this->folder, $this->folder . '_renamed'); - $ownerPath = $this->folder; + $ownerPath = $this->folder . '_owner_renamed'; $owner = self::TEST_FILES_SHARING_API_USER1; $result = \OCP\Share::getUsersSharingFile($ownerPath, $owner, $includeOwner, $includePaths); @@ -421,8 +424,8 @@ class Test_Files_Sharing extends OCA\Files_sharing\Tests\TestCase { true, true, [ - self::TEST_FILES_SHARING_API_USER1 => self::TEST_FOLDER_NAME, - self::TEST_FILES_SHARING_API_USER2 => self::TEST_FOLDER_NAME. '_renamed', + self::TEST_FILES_SHARING_API_USER1 => self::TEST_FOLDER_NAME . '_owner_renamed', + self::TEST_FILES_SHARING_API_USER2 => self::TEST_FOLDER_NAME . '_renamed', self::TEST_FILES_SHARING_API_USER3 => self::TEST_FOLDER_NAME, ], ], @@ -441,8 +444,8 @@ class Test_Files_Sharing extends OCA\Files_sharing\Tests\TestCase { true, true, [ - self::TEST_FILES_SHARING_API_USER1 => self::TEST_FOLDER_NAME, - self::TEST_FILES_SHARING_API_USER2 => self::TEST_FOLDER_NAME. '_renamed', + self::TEST_FILES_SHARING_API_USER1 => self::TEST_FOLDER_NAME . '_owner_renamed', + self::TEST_FILES_SHARING_API_USER2 => self::TEST_FOLDER_NAME . '_renamed', ], ], ]; -- cgit v1.2.3