adding client notes
Some checks failed
PHPUnit / test (push) Has been cancelled

This commit is contained in:
2026-07-17 17:10:04 +02:00
parent feae470fba
commit 6b3cd0da17
8 changed files with 178 additions and 7 deletions

View File

@ -83,4 +83,18 @@ final class ResultsAnalyticsTest extends QdbTestCase
$this->assertIsArray($match);
$this->assertSame($note, $match['note']);
}
public function testFollowUpNoteRejectsTooLong(): void
{
$this->submitFixtureQuestionnaire();
$token = $this->adminToken();
$code = $this->fixture()->clientCode;
$note = str_repeat('a', 201);
$save = $this->api()->withToken($token, 'PUT', 'analytics', [
'clientCode' => $code,
'note' => $note,
]);
$this->assertFalse($save['ok'] ?? true);
$this->assertSame('INVALID_FIELD', $save['error']['code'] ?? null);
}
}