summaryrefslogtreecommitdiffstats
path: root/apps/files_external/tests
diff options
context:
space:
mode:
authorRobin McCorkell <rmccorkell@owncloud.com>2016-01-15 23:17:22 +0000
committerRobin McCorkell <rmccorkell@owncloud.com>2016-01-15 23:17:22 +0000
commit0b7fc9fd11394bf1e4ee13de8210678bd3c1f80d (patch)
treef0d622fce14e60d9d1aebecbe209914b35b5a40c /apps/files_external/tests
parentfcec704174a384f93214a1f2b83bed385e763ff6 (diff)
downloadnextcloud-server-0b7fc9fd11394bf1e4ee13de8210678bd3c1f80d.tar.gz
nextcloud-server-0b7fc9fd11394bf1e4ee13de8210678bd3c1f80d.zip
Correctly remove global applicable
Diffstat (limited to 'apps/files_external/tests')
-rw-r--r--apps/files_external/tests/service/dbconfigservicetest.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/apps/files_external/tests/service/dbconfigservicetest.php b/apps/files_external/tests/service/dbconfigservicetest.php
index 2ee4c232c0d..41b5df73613 100644
--- a/apps/files_external/tests/service/dbconfigservicetest.php
+++ b/apps/files_external/tests/service/dbconfigservicetest.php
@@ -124,6 +124,18 @@ class DBConfigServiceTest extends TestCase {
$this->assertEquals([], $mount['applicable']);
}
+ public function testRemoveApplicableGlobal() {
+ $id = $this->addMount('/test', 'foo', 'bar', 100, DBConfigService::MOUNT_TYPE_ADMIN);
+ $this->dbConfig->addApplicable($id, DBConfigService::APPLICABLE_TYPE_GLOBAL, null);
+ $this->dbConfig->removeApplicable($id, DBConfigService::APPLICABLE_TYPE_GLOBAL, null);
+ $this->dbConfig->addApplicable($id, DBConfigService::APPLICABLE_TYPE_USER, 'test');
+
+ $mount = $this->dbConfig->getMountById($id);
+ $this->assertEquals([
+ ['type' => DBConfigService::APPLICABLE_TYPE_USER, 'value' => 'test', 'mount_id' => $id]
+ ], $mount['applicable']);
+ }
+
public function testSetConfig() {
$id = $this->addMount('/test', 'foo', 'bar', 100, DBConfigService::MOUNT_TYPE_ADMIN);
$this->dbConfig->setConfig($id, 'foo', 'bar');