From 53bd21a7d7be24ab47fed3b0b9b0c8718f8692d2 Mon Sep 17 00:00:00 2001 From: Maurice Date: Sat, 24 Oct 2026 22:36:28 +0200 Subject: [PATCH] test(assistant): a changed journal entry can be undone update_journey_entry answers the fields it replaced, so its card is undoable now, as JRN-015 already checks for the undo itself. --- .../unit/nest/assistant/cards/journey/journey-cards.test.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/tests/unit/nest/assistant/cards/journey/journey-cards.test.ts b/server/tests/unit/nest/assistant/cards/journey/journey-cards.test.ts index b3a577568..da436991e 100644 --- a/server/tests/unit/nest/assistant/cards/journey/journey-cards.test.ts +++ b/server/tests/unit/nest/assistant/cards/journey/journey-cards.test.ts @@ -307,7 +307,8 @@ describe('the change cards', () => { const loaded: JournalLoaded = { entry: entry(), journeyId: 3, title: 'B', tripJournal: false }; const updated = describeToolCall('update_journey_entry', 'c3', { entryId: 12, entry_time: '18:00' }, ctx, loaded); - expect(updated).toMatchObject({ verbKey: 'updateJournalEntry', subject: 'Sunset at the Spree', undoable: false }); + // A changed entry has its way back: the tool answers what the change replaced. + expect(updated).toMatchObject({ verbKey: 'updateJournalEntry', subject: 'Sunset at the Spree', undoable: true }); expect(updated.rows).toEqual([{ op: 'change', labelKey: 'time', before: '14:30', after: '18:00' }]); expect(describeToolCall('update_journey_entry', 'c4', {}, ctx).rows).toEqual([]);