mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-24 07:53:09 +00:00
test: follow the qol sweep in the e2e schemas and the assertions it changed
The hand-written e2e schemas gain the new columns and place_regions, and the unit assertions take the new arguments and fields. The Public API page names GET /api/auth/app-config for the running version.
This commit is contained in:
@@ -236,7 +236,7 @@ describe('addon-gated domains validate their input', () => {
|
||||
const toggleCompanyHoliday = vi.fn(() => ({}));
|
||||
const host = build({ vacay: { toggleCompanyHoliday } });
|
||||
await host.dispatch(req('vacay.toggleCompanyHoliday', { date: '2027-01-01' }), 42);
|
||||
expect(toggleCompanyHoliday).toHaveBeenCalledWith(1, '2027-01-01', undefined, undefined);
|
||||
expect(toggleCompanyHoliday).toHaveBeenCalledWith(1, '2027-01-01', undefined, undefined, undefined);
|
||||
});
|
||||
|
||||
it('ADDONERR-010e a collab message without a replyTo passes null', async () => {
|
||||
|
||||
@@ -285,7 +285,7 @@ describe('every schema-validated method rejects a payload its schema refuses', (
|
||||
createTestPluginRegistry([new VacayRpc(vacay, guards), new TagsRpc(tags)]),
|
||||
);
|
||||
await host.dispatch(req('vacay.toggleCompanyHoliday', { date: '2027-01-01', note: 42 }), 42);
|
||||
expect(toggleCompanyHoliday).toHaveBeenCalledWith(1, '2027-01-01', undefined, undefined);
|
||||
expect(toggleCompanyHoliday).toHaveBeenCalledWith(1, '2027-01-01', undefined, undefined, undefined);
|
||||
await host.dispatch(req('tags.update', { tagId: 1, input: { name: 'kept' } }), 42);
|
||||
expect(update).toHaveBeenCalledWith(1, 'kept', undefined);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user