summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@owncloud.com>2016-02-04 13:25:24 +0100
committerRoeland Jago Douma <rullzer@owncloud.com>2016-02-04 19:19:10 +0100
commit169874957a155bc01f5e573350a16f60ab586e0c (patch)
tree888b33cf1c20b3a2193630b77970e87e56606850 /tests
parentb57aac0a89c55fb6b227a4271d6e0869f61a8924 (diff)
downloadnextcloud-server-169874957a155bc01f5e573350a16f60ab586e0c.tar.gz
nextcloud-server-169874957a155bc01f5e573350a16f60ab586e0c.zip
Path should be relative
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/share20/managertest.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/lib/share20/managertest.php b/tests/lib/share20/managertest.php
index 1cdf63aa7e5..131bc7fbfd2 100644
--- a/tests/lib/share20/managertest.php
+++ b/tests/lib/share20/managertest.php
@@ -1875,7 +1875,7 @@ class ManagerTest extends \Test\TestCase {
$node = $this->getMock('\OCP\Files\File');
$node->method('getId')->willReturn(100);
- $node->method('getPath')->willReturn('myPath');
+ $node->method('getPath')->willReturn('/newUser/files/myPath');
$manager->expects($this->once())->method('canShare')->willReturn(true);
$manager->expects($this->once())->method('getShareById')->with('foo:42')->willReturn($originalShare);
@@ -1899,6 +1899,9 @@ class ManagerTest extends \Test\TestCase {
\OCP\Util::connectHook('OCP\Share', 'post_set_expiration_date', $hookListner, 'post');
$hookListner->expects($this->never())->method('post');
+ $this->rootFolder->method('getUserFolder')->with('newUser')->will($this->returnSelf());
+ $this->rootFolder->method('getRelativePath')->with('/newUser/files/myPath')->willReturn('/myPath');
+
$hookListner2 = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
\OCP\Util::connectHook('OCP\Share', 'post_update_permissions', $hookListner2, 'post');
$hookListner2->expects($this->once())->method('post')->with([
@@ -1908,7 +1911,7 @@ class ManagerTest extends \Test\TestCase {
'shareWith' => 'origUser',
'uidOwner' => 'sharer',
'permissions' => 31,
- 'path' => 'myPath',
+ 'path' => '/myPath',
]);
$manager->updateShare($share);