diff options
author | Morris Jobke <hey@morrisjobke.de> | 2016-07-20 16:19:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-20 16:19:21 +0200 |
commit | 1264e9644fbe0ac441a38c79cc9ac895ecdd3bc3 (patch) | |
tree | 09c8d0325cb9b225bdb634f2f74921297590fe09 /tests | |
parent | b37e1ed17f54916e3321427d92afa3f74ebea1b3 (diff) | |
parent | d485cfd40de078ba8c265ed32ab7e079795adbcf (diff) | |
download | nextcloud-server-1264e9644fbe0ac441a38c79cc9ac895ecdd3bc3.tar.gz nextcloud-server-1264e9644fbe0ac441a38c79cc9ac895ecdd3bc3.zip |
Merge pull request #402 from nextcloud/smb-notifications
smb update notifications
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/Files/Config/UserMountCacheTest.php | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/tests/lib/Files/Config/UserMountCacheTest.php b/tests/lib/Files/Config/UserMountCacheTest.php index e7554fc36d9..b9e09687c95 100644 --- a/tests/lib/Files/Config/UserMountCacheTest.php +++ b/tests/lib/Files/Config/UserMountCacheTest.php @@ -163,12 +163,14 @@ class UserMountCacheTest extends TestCase { $user = $this->userManager->get('u1'); $storage = $this->getStorage(10, 20); - $mount = new MountPoint($storage, '/foo/'); + $mount = new MountPoint($storage, '/bar/'); $this->cache->registerMounts($user, [$mount]); $this->clearCache(); + $mount = new MountPoint($storage, '/foo/'); + $this->cache->registerMounts($user, [$mount]); $this->clearCache(); @@ -180,6 +182,29 @@ class UserMountCacheTest extends TestCase { $this->assertEquals('/foo/', $cachedMount->getMountPoint()); } + public function testChangeMountId() { + $user = $this->userManager->get('u1'); + + $storage = $this->getStorage(10, 20); + $mount = new MountPoint($storage, '/foo/', null, null, null, null); + + $this->cache->registerMounts($user, [$mount]); + + $this->clearCache(); + + $mount = new MountPoint($storage, '/foo/', null, null, null, 1); + + $this->cache->registerMounts($user, [$mount]); + + $this->clearCache(); + + $cachedMounts = $this->cache->getMountsForUser($user); + + $this->assertCount(1, $cachedMounts); + $cachedMount = $cachedMounts[0]; + $this->assertEquals(1, $cachedMount->getMountId()); + } + public function testGetMountsForUser() { $user1 = $this->userManager->get('u1'); $user2 = $this->userManager->get('u2'); |