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:
Roeland Jago Douma 2018-09-06 17:09:00 +02:00
parent e7b1c9adc7
commit a2725c31e4
No known key found for this signature in database
GPG Key ID: F941078878347C0C
1 changed files with 7 additions and 7 deletions

View File

@ -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);
}
/**