From ab6ee79e116d7c212867ae1044bf4672c0b02084 Mon Sep 17 00:00:00 2001
From: Bjoern Schiessle <schiessle@owncloud.com>
Date: Thu, 17 Oct 2013 11:23:07 +0200
Subject: [PATCH] adjust tests

---
 apps/files_sharing/lib/api.php   | 2 +-
 apps/files_sharing/tests/api.php | 5 ++---
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/apps/files_sharing/lib/api.php b/apps/files_sharing/lib/api.php
index ae7728d552..15bd7be914 100644
--- a/apps/files_sharing/lib/api.php
+++ b/apps/files_sharing/lib/api.php
@@ -102,7 +102,7 @@ class Api {
 
 			// include also reshares in the lists. This means that the result
 			// will contain every user with access to the file.
-			if ($params['reshares'] === true) {
+			if (isset($params['reshares']) && $params['reshares'] === true) {
 				$shares = self::addReshares($shares, $itemSource);
 			}
 
diff --git a/apps/files_sharing/tests/api.php b/apps/files_sharing/tests/api.php
index 529140849c..14902df21c 100644
--- a/apps/files_sharing/tests/api.php
+++ b/apps/files_sharing/tests/api.php
@@ -197,10 +197,9 @@ class Test_Files_Sharing_Api extends \PHPUnit_Framework_TestCase {
 		\OCP\Share::shareItem('file', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_LINK,
 				null, 1);
 
-		$params = array('itemSource' => $fileInfo['fileid'],
-			'itemType' => 'file');
+		$params = array('path' => $this->filename);
 
-		$result = Share\Api::getShare($params);
+		$result = Share\Api::getAllShares($params);
 
 		$this->assertTrue($result->succeeded());
 
-- 
GitLab