summaryrefslogtreecommitdiffstats
path: root/apps/files_external/tests
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2016-06-17 13:29:29 +0200
committerRobin Appelman <icewind@owncloud.com>2016-06-23 13:12:03 +0200
commitbac1a3a6237b466d7b9d92491ad0f91d97247e46 (patch)
treea4b076b2c85d01248841a2df50d548124329164e /apps/files_external/tests
parent1e1903e4feffb98bde50cf41618d6bb3ef11c88a (diff)
downloadnextcloud-server-bac1a3a6237b466d7b9d92491ad0f91d97247e46.tar.gz
nextcloud-server-bac1a3a6237b466d7b9d92491ad0f91d97247e46.zip
Add option to `occ files_external:list` to show all configured mounts
Diffstat (limited to 'apps/files_external/tests')
-rw-r--r--apps/files_external/tests/Service/DBConfigServiceTest.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/apps/files_external/tests/Service/DBConfigServiceTest.php b/apps/files_external/tests/Service/DBConfigServiceTest.php
index b088a7078d1..3cfa33f0bc8 100644
--- a/apps/files_external/tests/Service/DBConfigServiceTest.php
+++ b/apps/files_external/tests/Service/DBConfigServiceTest.php
@@ -282,4 +282,14 @@ class DBConfigServiceTest extends TestCase {
$this->assertCount(1, $mounts);
$this->assertEquals($id1, $mounts[0]['mount_id']);
}
+
+ public function testGetAllMounts() {
+ $id1 = $this->addMount('/test', 'foo', 'bar', 100, DBConfigService::MOUNT_TYPE_ADMIN);
+ $id2 = $this->addMount('/test2', 'foo2', 'bar2', 100, DBConfigService::MOUNT_TYPE_PERSONAl);
+
+ $mounts = $this->dbConfig->getAllMounts();
+ $this->assertCount(2, $mounts);
+ $this->assertEquals($id1, $mounts[0]['mount_id']);
+ $this->assertEquals($id2, $mounts[1]['mount_id']);
+ }
}