summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2015-04-28 15:57:03 +0200
committerMorris Jobke <hey@morrisjobke.de>2015-04-28 15:57:03 +0200
commit337c541c0c23fb1724a66ef8f3e23c7a0c90152a (patch)
tree7c17574cf956a0458913de461557ea55bd431788 /apps/files_sharing
parentd32a5d5e8c9ae5696421e0797b9b69a9c2803256 (diff)
parent0f314ce4551c1fdd99514ac844d0bcb72077ffa8 (diff)
downloadnextcloud-server-337c541c0c23fb1724a66ef8f3e23c7a0c90152a.tar.gz
nextcloud-server-337c541c0c23fb1724a66ef8f3e23c7a0c90152a.zip
Merge pull request #15672 from owncloud/revert-15666-revert-15572-stable8-shares-properlyformatmountpoint
[stable8] Properly add trailing slash to mount point
Diffstat (limited to 'apps/files_sharing')
-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 715c22cf4ae..33fee2bd03e 100644
--- a/apps/files_sharing/tests/sharedmount.php
+++ b/apps/files_sharing/tests/sharedmount.php
@@ -141,14 +141,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);