mirror of
https://github.com/nextcloud/server.git
synced 2026-05-12 16:39:39 -04:00
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>
This commit is contained in:
parent
b66b2de6ff
commit
5e13368299
1 changed files with 7 additions and 7 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue