aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2018-03-16 12:28:41 +0100
committerMorris Jobke <hey@morrisjobke.de>2018-05-23 19:51:37 +0200
commitbc34a7f4e91610edca838f333ad7a14d11cc1880 (patch)
treeeaa12a09ed6582086da39b9377fb1b64efbafd01 /apps
parent3a41db7f67f5f22dacb1b2ffee7f8d86c04900ac (diff)
downloadnextcloud-server-bc34a7f4e91610edca838f333ad7a14d11cc1880.tar.gz
nextcloud-server-bc34a7f4e91610edca838f333ad7a14d11cc1880.zip
Get rid of shareItem
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'apps')
-rw-r--r--apps/files_sharing/tests/ApiTest.php22
-rw-r--r--apps/files_sharing/tests/BackendTest.php1
2 files changed, 1 insertions, 22 deletions
diff --git a/apps/files_sharing/tests/ApiTest.php b/apps/files_sharing/tests/ApiTest.php
index d7bc169bf4a..bf4cca53891 100644
--- a/apps/files_sharing/tests/ApiTest.php
+++ b/apps/files_sharing/tests/ApiTest.php
@@ -1213,28 +1213,6 @@ class ApiTest extends TestCase {
\OC_Hook::clear('OC_Filesystem', 'post_initMountPoints');
\OC_Hook::clear('\OCA\Files_Sharing\Tests\ApiTest', 'initTestMountPointsHook');
}
- /**
- * @expectedException \Exception
- */
- public function XtestShareNonExisting() {
- self::loginHelper(self::TEST_FILES_SHARING_API_USER1);
-
- $id = PHP_INT_MAX - 1;
- \OC\Share\Share::shareItem('file', $id, \OCP\Share::SHARE_TYPE_LINK, self::TEST_FILES_SHARING_API_USER2, 31);
- }
-
- /**
- * @expectedException \Exception
- */
- public function testShareNotOwner() {
- self::loginHelper(self::TEST_FILES_SHARING_API_USER2);
- \OC\Files\Filesystem::file_put_contents('foo.txt', 'bar');
- $info = \OC\Files\Filesystem::getFileInfo('foo.txt');
-
- self::loginHelper(self::TEST_FILES_SHARING_API_USER1);
-
- \OC\Share\Share::shareItem('file', $info->getId(), \OCP\Share::SHARE_TYPE_LINK, self::TEST_FILES_SHARING_API_USER2, 31);
- }
public function datesProvider() {
$date = new \DateTime();
diff --git a/apps/files_sharing/tests/BackendTest.php b/apps/files_sharing/tests/BackendTest.php
index 897cf7c2de2..5c44163d6a8 100644
--- a/apps/files_sharing/tests/BackendTest.php
+++ b/apps/files_sharing/tests/BackendTest.php
@@ -75,6 +75,7 @@ class BackendTest extends TestCase {
$fileinfo2 = $this->view->getFileInfo($this->folder . $this->subfolder . $this->subsubfolder);
$fileinfo3 = $this->view->getFileInfo($this->folder . $this->subfolder . $this->subsubfolder . $this->filename);
+ // TODO new sharing
$this->assertTrue(\OC\Share\Share::shareItem('folder', $fileinfo1['fileid'], \OCP\Share::SHARE_TYPE_USER,
self::TEST_FILES_SHARING_API_USER2, 31));
$this->assertTrue(\OC\Share\Share::shareItem('folder', $fileinfo2['fileid'], \OCP\Share::SHARE_TYPE_USER,