This commit is contained in:
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user