Skip to content

Commit efb4021

Browse files
committed
test: fix API tests to use internal file ID instead of nodeId
Update test methods to pass internal LibreSign file ID via getId() instead of Nextcloud nodeId. API endpoints expect the internal ID, not the filesystem node ID. Fixes: - NotifyControllerTest::testNotifySignersWithSuccess - SignFileControllerTest::testDeleteSignFileIdSignRequestIdWithSuccess - SignFileControllerTest::testDeleteUsingSignFileIdWithSuccess Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
1 parent 4907701 commit efb4021

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

tests/php/Api/Controller/NotifyControllerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public function testNotifySignersWithSuccess():void {
6767
'Content-Type' => 'application/json'
6868
])
6969
->withRequestBody([
70-
'fileId' => $file->getNodeId(),
70+
'fileId' => $file->getId(),
7171
'signers' => [
7272
[
7373
'email' => 'person@test.coop'

tests/php/Api/Controller/SignFileControllerTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ public function testDeleteSignFileIdSignRequestIdWithSuccess():void {
279279
->withRequestHeader([
280280
'Authorization' => 'Basic ' . base64_encode('allowrequestsign:password')
281281
])
282-
->withPath('/api/v1/sign/file_id/' . $file->getNodeId() . '/' . $signers[0]->getId());
282+
->withPath('/api/v1/sign/file_id/' . $file->getId() . '/' . $signers[0]->getId());
283283

284284
$this->assertRequest();
285285
}
@@ -326,7 +326,7 @@ public function testDeleteUsingSignFileIdWithSuccess():void {
326326
->withRequestHeader([
327327
'Authorization' => 'Basic ' . base64_encode('allowrequestsign:password')
328328
])
329-
->withPath('/api/v1/sign/file_id/' . $file->getNodeId());
329+
->withPath('/api/v1/sign/file_id/' . $file->getId());
330330

331331
$this->assertRequest();
332332
}

0 commit comments

Comments
 (0)