diff options
author | Robin Appelman <robin@icewind.nl> | 2020-10-28 16:00:49 +0100 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2020-10-29 16:43:21 +0100 |
commit | de7026f6e4662ff42e0a3c12021a3cee25c5d91f (patch) | |
tree | 3c54e336f533f58b3e48a163360e35f244503cba /tests/lib/Share20 | |
parent | 7ed11b6dfafb8793751f80a55f38e6242805386d (diff) | |
download | nextcloud-server-de7026f6e4662ff42e0a3c12021a3cee25c5d91f.tar.gz nextcloud-server-de7026f6e4662ff42e0a3c12021a3cee25c5d91f.zip |
use file name instead of path in 'not allowed to share' message
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'tests/lib/Share20')
-rw-r--r-- | tests/lib/Share20/ManagerTest.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/lib/Share20/ManagerTest.php b/tests/lib/Share20/ManagerTest.php index a33740834f5..36bc99b1d91 100644 --- a/tests/lib/Share20/ManagerTest.php +++ b/tests/lib/Share20/ManagerTest.php @@ -601,20 +601,22 @@ class ManagerTest extends \Test\TestCase { $nonShareAble = $this->createMock(Folder::class); $nonShareAble->method('isShareable')->willReturn(false); $nonShareAble->method('getPath')->willReturn('path'); + $nonShareAble->method('getName')->willReturn('name'); $nonShareAble->method('getOwner') ->willReturn($owner); $nonShareAble->method('getStorage') ->willReturn($storage); - $data[] = [$this->createShare(null, IShare::TYPE_USER, $nonShareAble, $user2, $user0, $user0, 31, null, null), 'You are not allowed to share path', true]; - $data[] = [$this->createShare(null, IShare::TYPE_GROUP, $nonShareAble, $group0, $user0, $user0, 31, null, null), 'You are not allowed to share path', true]; - $data[] = [$this->createShare(null, IShare::TYPE_LINK, $nonShareAble, null, $user0, $user0, 31, null, null), 'You are not allowed to share path', true]; + $data[] = [$this->createShare(null, IShare::TYPE_USER, $nonShareAble, $user2, $user0, $user0, 31, null, null), 'You are not allowed to share name', true]; + $data[] = [$this->createShare(null, IShare::TYPE_GROUP, $nonShareAble, $group0, $user0, $user0, 31, null, null), 'You are not allowed to share name', true]; + $data[] = [$this->createShare(null, IShare::TYPE_LINK, $nonShareAble, null, $user0, $user0, 31, null, null), 'You are not allowed to share name', true]; $limitedPermssions = $this->createMock(File::class); $limitedPermssions->method('isShareable')->willReturn(true); $limitedPermssions->method('getPermissions')->willReturn(\OCP\Constants::PERMISSION_READ); $limitedPermssions->method('getId')->willReturn(108); $limitedPermssions->method('getPath')->willReturn('path'); + $limitedPermssions->method('getName')->willReturn('name'); $limitedPermssions->method('getOwner') ->willReturn($owner); $limitedPermssions->method('getStorage') @@ -637,6 +639,7 @@ class ManagerTest extends \Test\TestCase { $nonMoveableMountPermssions->method('getPermissions')->willReturn(\OCP\Constants::PERMISSION_READ); $nonMoveableMountPermssions->method('getId')->willReturn(108); $nonMoveableMountPermssions->method('getPath')->willReturn('path'); + $nonMoveableMountPermssions->method('getName')->willReturn('name'); $nonMoveableMountPermssions->method('getOwner') ->willReturn($owner); $nonMoveableMountPermssions->method('getStorage') |