aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2015-04-13 13:16:07 +0200
committerMorris Jobke <hey@morrisjobke.de>2015-04-13 13:16:07 +0200
commita88e013f722a2bf30100074760509613c76ca807 (patch)
tree5e436a6f6973206ada03c870b07e4407f7e5e0a1 /apps
parentb67301ef998663df86abe7f24127910e0aa110be (diff)
parent2822d0579e170aa5f58d8726acb8c67e5633b523 (diff)
downloadnextcloud-server-a88e013f722a2bf30100074760509613c76ca807.tar.gz
nextcloud-server-a88e013f722a2bf30100074760509613c76ca807.zip
Merge pull request #15570 from owncloud/shares-properlyformatmountpoint
Properly add trailing slash to mount point
Diffstat (limited to 'apps')
-rw-r--r--apps/files_sharing/tests/sharedmount.php12
1 files changed, 9 insertions, 3 deletions
diff --git a/apps/files_sharing/tests/sharedmount.php b/apps/files_sharing/tests/sharedmount.php
index f64e1913905..ff4cb4c0e49 100644
--- a/apps/files_sharing/tests/sharedmount.php
+++ b/apps/files_sharing/tests/sharedmount.php
@@ -144,14 +144,20 @@ class Test_Files_Sharing_Mount extends OCA\Files_sharing\Tests\TestCase {
self::loginHelper(self::TEST_FILES_SHARING_API_USER2);
- \OC\Files\Filesystem::rename($this->filename, "newFileName");
+ \OC\Files\Filesystem::rename($this->filename, $this->filename . '_renamed');
- $this->assertTrue(\OC\Files\Filesystem::file_exists('newFileName'));
+ $this->assertTrue(\OC\Files\Filesystem::file_exists($this->filename . '_renamed'));
$this->assertFalse(\OC\Files\Filesystem::file_exists($this->filename));
self::loginHelper(self::TEST_FILES_SHARING_API_USER1);
$this->assertTrue(\OC\Files\Filesystem::file_exists($this->filename));
- $this->assertFalse(\OC\Files\Filesystem::file_exists("newFileName"));
+ $this->assertFalse(\OC\Files\Filesystem::file_exists($this->filename . '_renamed'));
+
+ // rename back to original name
+ self::loginHelper(self::TEST_FILES_SHARING_API_USER2);
+ \OC\Files\Filesystem::rename($this->filename . '_renamed', $this->filename);
+ $this->assertFalse(\OC\Files\Filesystem::file_exists($this->filename . '_renamed'));
+ $this->assertTrue(\OC\Files\Filesystem::file_exists($this->filename));
//cleanup
\OCP\Share::unshare('file', $fileinfo['fileid'], \OCP\Share::SHARE_TYPE_USER, self::TEST_FILES_SHARING_API_USER2);