fix(tests): Share manager error message from #52076

Signed-off-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
This commit is contained in:
John Molakvoæ 2025-04-14 17:09:20 +02:00 committed by skjnldsv
parent 4c67fe8521
commit 67c06622fa
2 changed files with 2 additions and 2 deletions

View file

@ -632,7 +632,7 @@ class Manager implements IManager {
$mounts = $this->mountManager->findIn($path->getPath());
foreach ($mounts as $mount) {
if ($mount->getStorage()->instanceOfStorage('\OCA\Files_Sharing\ISharedStorage')) {
throw new \InvalidArgumentException('Path contains files shared with you');
throw new \InvalidArgumentException('You cannot share a folder that contains other shares');
}
}
}

View file

@ -2273,7 +2273,7 @@ class ManagerTest extends \Test\TestCase {
public function testPathCreateChecksContainsSharedMount() {
$this->expectException(\InvalidArgumentException::class);
$this->expectExceptionMessage('Path contains files shared with you');
$this->expectExceptionMessage('You cannot share a folder that contains other shares');
$path = $this->createMock(Folder::class);
$path->method('getPath')->willReturn('path');