diff options
author | Vincent Petry <pvince81@owncloud.com> | 2014-02-19 19:08:28 +0100 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2014-02-19 19:08:28 +0100 |
commit | 9e9a5b9ea1f9b4699cf2d0c621f3f911f3639df9 (patch) | |
tree | 603b732b67725aae6c6380d636cba5e83ad9193e /apps/files_external/tests | |
parent | 952584e9c782d196eb2bcd6df1e3ecdf21adcb55 (diff) | |
download | nextcloud-server-9e9a5b9ea1f9b4699cf2d0c621f3f911f3639df9.tar.gz nextcloud-server-9e9a5b9ea1f9b4699cf2d0c621f3f911f3639df9.zip |
Added extra checks for ext storage class
Diffstat (limited to 'apps/files_external/tests')
-rw-r--r-- | apps/files_external/tests/mountconfig.php | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/apps/files_external/tests/mountconfig.php b/apps/files_external/tests/mountconfig.php index 941aec680bb..4c61b8961f3 100644 --- a/apps/files_external/tests/mountconfig.php +++ b/apps/files_external/tests/mountconfig.php @@ -48,4 +48,28 @@ class Test_Mount_Config extends \PHPUnit_Framework_TestCase { $this->assertEquals(false, OC_Mount_Config::addMountPoint('/Shared', $storageClass, array(), $mountType, $applicable, $isPersonal)); } + + public function testAddMountPointSingleUser() { + \OC_User::setUserId('test'); + $mountType = 'user'; + $applicable = 'test'; + $isPersonal = true; + // local + $this->assertEquals(false, OC_Mount_Config::addMountPoint('/ext', '\OC\Files\storage\local', array(), $mountType, $applicable, $isPersonal)); + // non-local + $this->assertEquals(true, OC_Mount_Config::addMountPoint('/ext', '\OC\Files\Storage\SFTP', array(), $mountType, $applicable, $isPersonal)); + + } + + public function testAddMountPointUnexistClass() { + \OC_User::setUserId('test'); + $storageClass = 'Unexist_Storage'; + $mountType = 'user'; + $applicable = 'test'; + $isPersonal = true; + // local + // non-local + $this->assertEquals(false, OC_Mount_Config::addMountPoint('/ext', $storageClass, array(), $mountType, $applicable, $isPersonal)); + + } } |