diff options
Diffstat (limited to 'apps/files_external/tests')
6 files changed, 25 insertions, 0 deletions
diff --git a/apps/files_external/tests/controller/storagescontrollertest.php b/apps/files_external/tests/controller/storagescontrollertest.php index fefe2928d76..853b4a86f03 100644 --- a/apps/files_external/tests/controller/storagescontrollertest.php +++ b/apps/files_external/tests/controller/storagescontrollertest.php @@ -62,6 +62,7 @@ abstract class StoragesControllerTest extends \Test\TestCase { array(), [], [], + [], null ); @@ -85,6 +86,7 @@ abstract class StoragesControllerTest extends \Test\TestCase { array(), [], [], + [], null ); @@ -116,6 +118,7 @@ abstract class StoragesControllerTest extends \Test\TestCase { array(), [], [], + [], null ); @@ -128,6 +131,7 @@ abstract class StoragesControllerTest extends \Test\TestCase { array(), [], [], + [], null ); @@ -146,6 +150,7 @@ abstract class StoragesControllerTest extends \Test\TestCase { array(), [], [], + [], null ); @@ -158,6 +163,7 @@ abstract class StoragesControllerTest extends \Test\TestCase { array(), [], [], + [], null ); @@ -176,6 +182,7 @@ abstract class StoragesControllerTest extends \Test\TestCase { array(), [], [], + [], null ); @@ -204,6 +211,7 @@ abstract class StoragesControllerTest extends \Test\TestCase { $storageConfig->setMountPoint('test'); $storageConfig->setBackendClass('\OC\Files\Storage\SMB'); $storageConfig->setBackendOptions(['user' => 'test', 'password', 'password123']); + $storageConfig->setMountOptions(['priority' => false]); $this->service->expects($this->once()) ->method('getStorage') diff --git a/apps/files_external/tests/controller/userstoragescontrollertest.php b/apps/files_external/tests/controller/userstoragescontrollertest.php index 9d6fbb15e23..0ba413f6959 100644 --- a/apps/files_external/tests/controller/userstoragescontrollertest.php +++ b/apps/files_external/tests/controller/userstoragescontrollertest.php @@ -91,6 +91,7 @@ class UserStoragesControllerTest extends StoragesControllerTest { array(), [], [], + [], null ); @@ -103,6 +104,7 @@ class UserStoragesControllerTest extends StoragesControllerTest { array(), [], [], + [], null ); diff --git a/apps/files_external/tests/service/globalstoragesservicetest.php b/apps/files_external/tests/service/globalstoragesservicetest.php index 6286865bf43..f5cdcfa3907 100644 --- a/apps/files_external/tests/service/globalstoragesservicetest.php +++ b/apps/files_external/tests/service/globalstoragesservicetest.php @@ -50,6 +50,9 @@ class GlobalStoragesServiceTest extends StoragesServiceTest { 'applicableUsers' => [], 'applicableGroups' => [], 'priority' => 15, + 'mountOptions' => [ + 'preview' => false, + ] ]); } @@ -638,6 +641,7 @@ class GlobalStoragesServiceTest extends StoragesServiceTest { $this->assertEquals(1, $mountPointOptions['id']); $this->assertEquals('\OC\Files\Storage\SMB', $mountPointOptions['class']); $this->assertEquals(15, $mountPointOptions['priority']); + $this->assertEquals(false, $mountPointOptions['mountOptions']['preview']); $backendOptions = $mountPointOptions['options']; $this->assertEquals('value1', $backendOptions['option1']); @@ -677,6 +681,7 @@ class GlobalStoragesServiceTest extends StoragesServiceTest { $this->assertEquals(1, $mountPointOptions['id']); $this->assertEquals('\OC\Files\Storage\SMB', $mountPointOptions['class']); $this->assertEquals(15, $mountPointOptions['priority']); + $this->assertEquals(false, $mountPointOptions['mountOptions']['preview']); $backendOptions = $mountPointOptions['options']; $this->assertEquals('value1', $backendOptions['option1']); @@ -693,6 +698,7 @@ class GlobalStoragesServiceTest extends StoragesServiceTest { $this->assertEquals(1, $mountPointOptions['id']); $this->assertEquals('\OC\Files\Storage\SMB', $mountPointOptions['class']); $this->assertEquals(15, $mountPointOptions['priority']); + $this->assertEquals(false, $mountPointOptions['mountOptions']['preview']); $backendOptions = $mountPointOptions['options']; $this->assertEquals('value1', $backendOptions['option1']); diff --git a/apps/files_external/tests/service/storagesservicetest.php b/apps/files_external/tests/service/storagesservicetest.php index 1e338b3948d..445e86d4117 100644 --- a/apps/files_external/tests/service/storagesservicetest.php +++ b/apps/files_external/tests/service/storagesservicetest.php @@ -96,6 +96,9 @@ abstract class StoragesServiceTest extends \Test\TestCase { if (isset($data['priority'])) { $storage->setPriority($data['priority']); } + if (isset($data['mountOptions'])) { + $storage->setMountOptions($data['mountOptions']); + } return $storage; } diff --git a/apps/files_external/tests/service/userstoragesservicetest.php b/apps/files_external/tests/service/userstoragesservicetest.php index 64d59dc7d03..77b3842b318 100644 --- a/apps/files_external/tests/service/userstoragesservicetest.php +++ b/apps/files_external/tests/service/userstoragesservicetest.php @@ -61,6 +61,9 @@ class UserStoragesServiceTest extends StoragesServiceTest { 'option2' => 'value2', 'password' => 'testPassword', ], + 'mountOptions' => [ + 'preview' => false, + ] ]); } @@ -190,6 +193,7 @@ class UserStoragesServiceTest extends StoragesServiceTest { $mountPointOptions = current($mountPointData); $this->assertEquals(1, $mountPointOptions['id']); $this->assertEquals('\OC\Files\Storage\SMB', $mountPointOptions['class']); + $this->assertEquals(false, $mountPointOptions['mountOptions']['preview']); $backendOptions = $mountPointOptions['options']; $this->assertEquals('value1', $backendOptions['option1']); diff --git a/apps/files_external/tests/storageconfigtest.php b/apps/files_external/tests/storageconfigtest.php index 473dc20b387..ec79b1bf306 100644 --- a/apps/files_external/tests/storageconfigtest.php +++ b/apps/files_external/tests/storageconfigtest.php @@ -34,6 +34,7 @@ class StorageConfigTest extends \Test\TestCase { $storageConfig->setPriority(128); $storageConfig->setApplicableUsers(['user1', 'user2']); $storageConfig->setApplicableGroups(['group1', 'group2']); + $storageConfig->setMountOptions(['preview' => false]); $json = $storageConfig->jsonSerialize(); @@ -45,6 +46,7 @@ class StorageConfigTest extends \Test\TestCase { $this->assertEquals(128, $json['priority']); $this->assertEquals(['user1', 'user2'], $json['applicableUsers']); $this->assertEquals(['group1', 'group2'], $json['applicableGroups']); + $this->assertEquals(['preview' => false], $json['mountOptions']); } } |