summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/tests/ApiTest.php
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2016-09-20 17:59:24 +0200
committerRobin Appelman <robin@icewind.nl>2016-10-12 16:12:36 +0200
commit7d1e800c153d362569a1e6f462109212c03f3b0a (patch)
tree284bfe1e921f22729001746895124cb1fb4fe0fa /apps/files_sharing/tests/ApiTest.php
parent1b3b816a0a2ffb80d2495cd7394988e689351c47 (diff)
downloadnextcloud-server-7d1e800c153d362569a1e6f462109212c03f3b0a.tar.gz
nextcloud-server-7d1e800c153d362569a1e6f462109212c03f3b0a.zip
fix share tests not passing path
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'apps/files_sharing/tests/ApiTest.php')
-rw-r--r--apps/files_sharing/tests/ApiTest.php11
1 files changed, 7 insertions, 4 deletions
diff --git a/apps/files_sharing/tests/ApiTest.php b/apps/files_sharing/tests/ApiTest.php
index 0a8b4b119cd..aff3aadd7e7 100644
--- a/apps/files_sharing/tests/ApiTest.php
+++ b/apps/files_sharing/tests/ApiTest.php
@@ -628,7 +628,7 @@ class ApiTest extends TestCase {
);
foreach ($testValues as $value) {
- $ocs = $this->createOCS(self::TEST_FILES_SHARING_API_USER2);
+ $ocs = $this->createOCS(self::TEST_FILES_SHARING_API_USER2);
$result = $ocs->getShares('false', 'false', 'true', $value['query']);
$ocs->cleanup();
@@ -765,6 +765,7 @@ class ApiTest extends TestCase {
* @medium
*/
function testGetShareMultipleSharedFolder() {
+ $this->setUp();
$node1 = $this->userFolder->get($this->folder . $this->subfolder);
$share1 = $this->shareManager->newShare();
$share1->setNode($node1)
@@ -790,8 +791,9 @@ class ApiTest extends TestCase {
->setPermissions(1);
$share3 = $this->shareManager->createShare($share3);
+ // $request = $this->createRequest(['path' => $this->subfolder]);
$ocs = $this->createOCS(self::TEST_FILES_SHARING_API_USER2);
- $result1 = $ocs->getShares();
+ $result1 = $ocs->getShares('false','false','false', $this->subfolder);
$ocs->cleanup();
// test should return one share within $this->folder
@@ -799,8 +801,9 @@ class ApiTest extends TestCase {
$this->assertCount(1, $data1);
$s1 = reset($data1);
+ //$request = $this->createRequest(['path' => $this->folder.$this->subfolder]);
$ocs = $this->createOCS(self::TEST_FILES_SHARING_API_USER2);
- $result2 = $ocs->getShares();
+ $result2 = $ocs->getShares('false', 'false', 'false', $this->folder . $this->subfolder);
$ocs->cleanup();
// test should return one share within $this->folder
@@ -808,7 +811,7 @@ class ApiTest extends TestCase {
$this->assertCount(1, $data2);
$s2 = reset($data2);
- $this->assertEquals($this->folder.$this->subfolder, $s1['path']);
+ $this->assertEquals($this->subfolder, $s1['path']);
$this->assertEquals($this->folder.$this->subfolder, $s2['path']);
$this->shareManager->deleteShare($share1);