summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2015-11-10 14:36:15 +0100
committerRobin Appelman <robin@icewind.nl>2015-11-10 14:36:15 +0100
commitbbe2f5c2d57d57d5f89a76b63b9ba43bd0168169 (patch)
treecdd65f29a07f44762093636b9ab0010537c7d1c8 /apps
parentf77c6dbbed34fc1dcaaa3d35c7a9ecc499ce3e36 (diff)
parent20cad09f7fa7f81862fbfb538bed7ddd8c0923b3 (diff)
downloadnextcloud-server-bbe2f5c2d57d57d5f89a76b63b9ba43bd0168169.tar.gz
nextcloud-server-bbe2f5c2d57d57d5f89a76b63b9ba43bd0168169.zip
Merge pull request #20224 from owncloud/fileinfo-owner
Add getOwner to FileInfo
Diffstat (limited to 'apps')
-rw-r--r--apps/files_sharing/tests/share.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/apps/files_sharing/tests/share.php b/apps/files_sharing/tests/share.php
index abff820c168..896191dfe51 100644
--- a/apps/files_sharing/tests/share.php
+++ b/apps/files_sharing/tests/share.php
@@ -322,6 +322,22 @@ class Test_Files_Sharing extends OCA\Files_sharing\Tests\TestCase {
);
}
+ public function testFileOwner() {
+
+ $fileinfo = $this->view->getFileInfo($this->filename);
+
+ $result = \OCP\Share::shareItem('file', $fileinfo['fileid'], \OCP\Share::SHARE_TYPE_USER,
+ \Test_Files_Sharing::TEST_FILES_SHARING_API_USER2, \OCP\Constants::PERMISSION_ALL);
+
+ $this->assertTrue($result);
+
+ $this->loginHelper(\Test_Files_Sharing::TEST_FILES_SHARING_API_USER2);
+
+ $info = \OC\Files\Filesystem::getFileInfo($this->filename);
+
+ $this->assertSame(\Test_Files_Sharing::TEST_FILES_SHARING_API_USER1, $info->getOwner()->getUID());
+ }
+
/**
* @dataProvider dataProviderGetUsersSharingFile
*