mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-13 07:40:59 +00:00
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:
@@ -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);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user