Skip to content

Commit 6fc2bcb

Browse files
committed
fixup! refactor: streamline form update logic and enhance permission checks for archiving, locking, and ownership transfer
Signed-off-by: Christian Hartmann <chris-hartmann@gmx.de>
1 parent c46650a commit 6fc2bcb

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

tests/Unit/Controller/ApiControllerTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -468,9 +468,9 @@ public function testCloneForm_exceptions(bool $canCreate, $callback, string $exc
468468
$this->configService->expects($this->once())
469469
->method('canCreateForms')
470470
->willReturn($canCreate);
471-
$this->formMapper->expects($canCreate ? $this->once() : $this->never())
472-
->method('findById')
473-
->with(7)
471+
$this->formsService->expects($canCreate ? $this->once() : $this->never())
472+
->method('getFormIfAllowed')
473+
->with(7, Constants::PERMISSION_EDIT)
474474
->willReturnCallback($callback);
475475
$this->expectException($exception);
476476
$this->apiController->newForm(7);

0 commit comments

Comments
 (0)