]> source.dussan.org Git - nextcloud-server.git/commitdiff
adjust tests
authorBjoern Schiessle <schiessle@owncloud.com>
Thu, 17 Oct 2013 09:23:07 +0000 (11:23 +0200)
committerBjoern Schiessle <schiessle@owncloud.com>
Thu, 17 Oct 2013 09:23:07 +0000 (11:23 +0200)
apps/files_sharing/lib/api.php
apps/files_sharing/tests/api.php

index ae7728d552fda6f6035b229a9658e0dd7f3dc2d6..15bd7be9143c965f1a8b930874cc535b3c9fa732 100644 (file)
@@ -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);
                        }
 
index 529140849c6bbf76d1435ed065c781ac13ebce66..14902df21c666d7c421849d335a9944c8fa417de 100644 (file)
@@ -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());