diff options
author | Robin Appelman <icewind@owncloud.com> | 2016-04-25 14:28:01 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2016-04-25 14:28:01 +0200 |
commit | ca5b189522750dabb5c49981edbd5ece1c3d3454 (patch) | |
tree | 7d45c5860d84c9a13b2318f4a925d8b247888b99 /apps/files_external/tests | |
parent | 7e8fd2c639f0f28a3eaf2f62cf98ca0f37ec5396 (diff) | |
download | nextcloud-server-ca5b189522750dabb5c49981edbd5ece1c3d3454.tar.gz nextcloud-server-ca5b189522750dabb5c49981edbd5ece1c3d3454.zip |
add test
Diffstat (limited to 'apps/files_external/tests')
-rw-r--r-- | apps/files_external/tests/service/dbconfigservicetest.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/apps/files_external/tests/service/dbconfigservicetest.php b/apps/files_external/tests/service/dbconfigservicetest.php index c6d1add36b6..b088a7078d1 100644 --- a/apps/files_external/tests/service/dbconfigservicetest.php +++ b/apps/files_external/tests/service/dbconfigservicetest.php @@ -271,4 +271,15 @@ class DBConfigServiceTest extends TestCase { $mount = $this->dbConfig->getMountById($id2); $this->assertEquals('bar', $mount['auth_backend']); } + + public function testGetMountsForDuplicateByGroup() { + $id1 = $this->addMount('/test', 'foo', 'bar', 100, DBConfigService::MOUNT_TYPE_ADMIN); + + $this->dbConfig->addApplicable($id1, DBConfigService::APPLICABLE_TYPE_GROUP, 'group1'); + $this->dbConfig->addApplicable($id1, DBConfigService::APPLICABLE_TYPE_GROUP, 'group2'); + + $mounts = $this->dbConfig->getAdminMountsForMultiple(DBConfigService::APPLICABLE_TYPE_GROUP, ['group1', 'group2']); + $this->assertCount(1, $mounts); + $this->assertEquals($id1, $mounts[0]['mount_id']); + } } |