aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/tests
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2015-06-30 13:49:54 +0200
committerRobin Appelman <icewind@owncloud.com>2015-07-01 15:10:25 +0200
commit3c0be7d126b4cff840c0e6b1b386c20b4eff1721 (patch)
tree86cdbee402ed0ff64e89034993dbc98a5bc07b0e /apps/files_sharing/tests
parentd6f56ea609c41431458c0b565042caf945ab56cc (diff)
downloadnextcloud-server-3c0be7d126b4cff840c0e6b1b386c20b4eff1721.tar.gz
nextcloud-server-3c0be7d126b4cff840c0e6b1b386c20b4eff1721.zip
only lock the parent folders
Diffstat (limited to 'apps/files_sharing/tests')
-rw-r--r--apps/files_sharing/tests/locking.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/apps/files_sharing/tests/locking.php b/apps/files_sharing/tests/locking.php
index 46afbf294be..6d13fc1cda5 100644
--- a/apps/files_sharing/tests/locking.php
+++ b/apps/files_sharing/tests/locking.php
@@ -87,4 +87,15 @@ class Locking extends TestCase {
$this->assertTrue(Filesystem::rename('/foo', '/asd'));
}
+
+ public function testChangeLock() {
+
+ Filesystem::initMountPoints($this->recipientUid);
+ $recipientView = new View('/' . $this->recipientUid . '/files');
+ $recipientView->lockFile('bar.txt', ILockingProvider::LOCK_SHARED);
+ $recipientView->changeLock('bar.txt', ILockingProvider::LOCK_EXCLUSIVE);
+ $recipientView->unlockFile('bar.txt', ILockingProvider::LOCK_EXCLUSIVE);
+
+ $this->assertTrue(true);
+ }
}