test(insights): drop summary update from testUpdate

User Update only accepts severity + status now — analyzer-controlled
fields like summary flow through the manager Create endpoint. The
previous testUpdate sent `summary: 'Updated summary.'` and asserted
it changed; Utopia silently dropped the unknown param so the
assertion would have failed.

Trim the call to severity-only and verify the analyzer fields
(including summary) are preserved on the response.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jake Barnby
2026-05-06 18:34:04 +12:00
co-authored by Claude Opus 4.7
parent 0b72dba817
commit 1f4111d6f2
+4 -3
View File
@@ -686,15 +686,16 @@ trait InsightsBase
$updated = $this->updateInsight($data['insightId'], [
'severity' => 'critical',
'summary' => 'Updated summary.',
]);
$this->assertSame(200, $updated['headers']['status-code']);
$this->assertSame('critical', $updated['body']['severity']);
$this->assertSame('Updated summary.', $updated['body']['summary']);
// Untouched fields preserved (regression for partial-document overwrite)
// Analyzer-controlled fields preserved (regression for partial-document
// overwrite). User Update only takes `severity` and `status`; everything
// else flows through the manager Create endpoint.
$this->assertSame($original['title'], $updated['body']['title']);
$this->assertSame($original['summary'], $updated['body']['summary']);
$this->assertSame($original['type'], $updated['body']['type']);
$this->assertSame($original['resourceType'], $updated['body']['resourceType']);
$this->assertSame($original['resourceId'], $updated['body']['resourceId']);