mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-05 04:04:07 +00:00
test(vacay): a day in a year the plan has not opened also announces the new year
The broadcast parity cases toggle a day in 2027, which the seeded plan does not hold, so both MCP and REST now send vacay:settings for the opened year before vacay:update.
This commit is contained in:
@@ -602,14 +602,22 @@ const vacayCases: ParityCase[] = [
|
||||
needs: ['vacay'],
|
||||
args: () => ({ date: '2027-06-01' }),
|
||||
rest: { method: 'post', path: () => `${VACAY}/entries/toggle`, body: () => ({ date: '2027-06-01' }) },
|
||||
expect: [{ event: 'vacay:update', user: 'actor' }],
|
||||
// 2027 is not a year of the plan yet, so the day opens it too.
|
||||
expect: [
|
||||
{ event: 'vacay:settings', user: 'actor' },
|
||||
{ event: 'vacay:update', user: 'actor' },
|
||||
],
|
||||
},
|
||||
{
|
||||
tool: 'toggle_company_holiday',
|
||||
needs: ['vacay'],
|
||||
args: () => ({ date: '2027-06-02' }),
|
||||
rest: { method: 'post', path: () => `${VACAY}/entries/company-holiday`, body: () => ({ date: '2027-06-02' }) },
|
||||
expect: [{ event: 'vacay:update', user: 'actor' }],
|
||||
// 2027 is not a year of the plan yet, so the day opens it too.
|
||||
expect: [
|
||||
{ event: 'vacay:settings', user: 'actor' },
|
||||
{ event: 'vacay:update', user: 'actor' },
|
||||
],
|
||||
},
|
||||
{
|
||||
tool: 'update_vacay_stats',
|
||||
|
||||
Reference in New Issue
Block a user