diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2014-06-05 20:33:52 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2014-06-09 12:44:40 +0200 |
commit | 961e4e5c7ce315c29cbae720e41ee50b91331e37 (patch) | |
tree | cd58d0d410d628e198a9baa401ea3c43cf102042 | |
parent | aa38bd2b311a2f702cd1cbb425daed5f3b1555af (diff) | |
download | nextcloud-server-961e4e5c7ce315c29cbae720e41ee50b91331e37.tar.gz nextcloud-server-961e4e5c7ce315c29cbae720e41ee50b91331e37.zip |
adjust unit test assert values
-rw-r--r-- | apps/files_sharing/tests/permissions.php | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/apps/files_sharing/tests/permissions.php b/apps/files_sharing/tests/permissions.php index bff71095185..2cbc412d261 100644 --- a/apps/files_sharing/tests/permissions.php +++ b/apps/files_sharing/tests/permissions.php @@ -141,16 +141,14 @@ class Test_Files_Sharing_Permissions extends Test_Files_Sharing_Base { $this->assertEquals('subdir', $contents[0]['name']); $this->assertEquals(31, $contents[0]['permissions']); $this->assertEquals('textfile.txt', $contents[1]['name']); - $this->assertEquals(31, $contents[1]['permissions']); + // 27 is correct because create is reserved to folders only - requires more unit tests overall to ensure this + $this->assertEquals(27, $contents[1]['permissions']); $contents = $this->secondView->getDirectoryContent('files/shareddirrestricted'); $this->assertEquals('subdir', $contents[0]['name']); - $this->assertEquals(7, $contents[0]['permissions']); + $this->assertEquals(7 | \OCP\PERMISSION_DELETE, $contents[0]['permissions']); $this->assertEquals('textfile1.txt', $contents[1]['name']); - $this->assertEquals(7, $contents[1]['permissions']); - - // the share mount point should always have delete permissions to allow the user - // to unmount it - $restrictedShare = $this->secondView->getFileInfo('files/shareddirrestricted'); - $this->assertEquals(7 | \OCP\PERMISSION_DELETE, $restrictedShare['permissions']); + // 3 is correct because create is reserved to folders only + // delete permissions are added since mount points can always be deleted + $this->assertEquals(3 | \OCP\PERMISSION_DELETE, $contents[1]['permissions']); } } |