diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2018-09-06 17:09:00 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2018-09-06 17:10:21 +0200 |
commit | a2725c31e4f0e043c96bb6b5fdb75bb4c43a3227 (patch) | |
tree | 57884a3d61d4482756cd3966b21d7322ae937f49 | |
parent | e7b1c9adc78a637f1ff9f10c4a2be80377c70fa6 (diff) | |
download | nextcloud-server-a2725c31e4f0e043c96bb6b5fdb75bb4c43a3227.tar.gz nextcloud-server-a2725c31e4f0e043c96bb6b5fdb75bb4c43a3227.zip |
Update test now that we check permissions properly
Now that we actually check thepermissions properly we have to update the
tests.
* We checked an invalid path
* We checked from wrong permissions (files never have CREATE permissions
for example)
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
-rw-r--r-- | apps/files_sharing/tests/PermissionsTest.php | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/apps/files_sharing/tests/PermissionsTest.php b/apps/files_sharing/tests/PermissionsTest.php index 2eca474e966..5c0086646de 100644 --- a/apps/files_sharing/tests/PermissionsTest.php +++ b/apps/files_sharing/tests/PermissionsTest.php @@ -134,14 +134,14 @@ class PermissionsTest extends TestCase { * Test that the permissions of shared directory are returned correctly */ function testGetPermissions() { - $sharedDirPerms = $this->sharedStorage->getPermissions('shareddir'); + $sharedDirPerms = $this->sharedStorage->getPermissions(''); $this->assertEquals(31, $sharedDirPerms); - $sharedDirPerms = $this->sharedStorage->getPermissions('shareddir/textfile.txt'); - $this->assertEquals(31, $sharedDirPerms); - $sharedDirRestrictedPerms = $this->sharedStorageRestrictedShare->getPermissions('shareddirrestricted'); - $this->assertEquals(7, $sharedDirRestrictedPerms); - $sharedDirRestrictedPerms = $this->sharedStorageRestrictedShare->getPermissions('shareddirrestricted/textfile.txt'); - $this->assertEquals(7, $sharedDirRestrictedPerms); + $sharedDirPerms = $this->sharedStorage->getPermissions('textfile.txt'); + $this->assertEquals(27, $sharedDirPerms); + $sharedDirRestrictedPerms = $this->sharedStorageRestrictedShare->getPermissions(''); + $this->assertEquals(15, $sharedDirRestrictedPerms); + $sharedDirRestrictedPerms = $this->sharedStorageRestrictedShare->getPermissions('textfile1.txt'); + $this->assertEquals(3, $sharedDirRestrictedPerms); } /** |