fix(mcp): hold two more tests to the fixed Costs keys

The budget prompt and the price link of a new transport now read the stored key.
This commit is contained in:
Maurice
2026-11-04 15:00:03 +01:00
parent 50ea9a74c9
commit 9eab19ea6c
2 changed files with 6 additions and 5 deletions
+4 -4
View File
@@ -565,10 +565,10 @@ describe('Prompt: budget-overview', () => {
const client = await buildServer(user.id);
const text = await invokePromptText(client, 'budget-overview', { tripId: trip.id });
expect(text).toContain('Budget Trip');
expect(text).toContain('Transport');
expect(text).toContain('Accommodation');
expect(text).toContain('550'); // Transport total
expect(text).toContain('300'); // Accommodation total
// Totals group by the fixed Costs key, whatever case the expense was stored in (#2835).
expect(text).toContain('- transport: 250');
expect(text).toContain('- accommodation: 300');
expect(text).toContain('550');
});
it('prints a foreign-currency bill at the rate it was booked at, not as that many euros (#2525)', async () => {
@@ -349,7 +349,8 @@ describe('Transport tools: the price link', () => {
const data = parseToolResult(result) as { reservation: { id: number } };
const item = await findRow(orm, BudgetItems, { reservation: data.reservation.id });
expect(item).toMatchObject({ name: 'ZRH → CDG', category: 'Flights', total_price: 240 });
// Stored as its fixed Costs key (#2835).
expect(item).toMatchObject({ name: 'ZRH → CDG', category: 'flights', total_price: 240 });
// The price also rides along in the reservation metadata, as the REST path does.
expect(broadcastMock.mock.calls.some((c) => c[1] === 'budget:created')).toBe(true);
});