Tests, UX improvements.
This commit is contained in:
parent
4e6f5d36b8
commit
0ae18f495e
63 changed files with 1384 additions and 2330 deletions
|
|
@ -16,7 +16,6 @@ import {
|
|||
eventPaymentSchema,
|
||||
updateContributionSchema,
|
||||
peerSupportUpdateSchema,
|
||||
updatePatchSchema,
|
||||
seriesTicketPurchaseSchema,
|
||||
seriesTicketEligibilitySchema,
|
||||
adminSeriesCreateSchema,
|
||||
|
|
@ -329,28 +328,6 @@ describe('peerSupportUpdateSchema', () => {
|
|||
})
|
||||
})
|
||||
|
||||
// --- Update schemas ---
|
||||
|
||||
describe('updatePatchSchema', () => {
|
||||
it('accepts valid update patch', () => {
|
||||
const result = updatePatchSchema.safeParse({
|
||||
content: 'Updated content',
|
||||
privacy: 'members'
|
||||
})
|
||||
expect(result.success).toBe(true)
|
||||
})
|
||||
|
||||
it('accepts empty object (all optional)', () => {
|
||||
const result = updatePatchSchema.safeParse({})
|
||||
expect(result.success).toBe(true)
|
||||
})
|
||||
|
||||
it('rejects invalid privacy enum', () => {
|
||||
const result = updatePatchSchema.safeParse({ privacy: 'invalid' })
|
||||
expect(result.success).toBe(false)
|
||||
})
|
||||
})
|
||||
|
||||
// --- Series schemas ---
|
||||
|
||||
describe('seriesTicketPurchaseSchema', () => {
|
||||
|
|
@ -529,7 +506,6 @@ describe('validateBody migration coverage', () => {
|
|||
'events/[id]/payment.post.js',
|
||||
'members/update-contribution.post.js',
|
||||
'members/me/peer-support.patch.js',
|
||||
'updates/[id].patch.js',
|
||||
'series/[id]/tickets/purchase.post.js',
|
||||
'series/[id]/tickets/check-eligibility.post.js',
|
||||
'admin/series.post.js',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue