fix setting and add rental policies
Test / Type Check (all packages) (push) Has been cancelled
Test / API Unit Tests (push) Has been cancelled
Test / Homepage Unit Tests (push) Has been cancelled
Test / Carplace Unit Tests (push) Has been cancelled
Test / Admin Unit Tests (push) Has been cancelled
Test / Dashboard Unit Tests (push) Has been cancelled
Test / API Integration Tests (push) Has been cancelled
Build & Push / Pipeline Tests (push) Waiting to run
Build & Push / Build & Push Docker Image (push) Blocked by required conditions
Test / Type Check (all packages) (push) Has been cancelled
Test / API Unit Tests (push) Has been cancelled
Test / Homepage Unit Tests (push) Has been cancelled
Test / Carplace Unit Tests (push) Has been cancelled
Test / Admin Unit Tests (push) Has been cancelled
Test / Dashboard Unit Tests (push) Has been cancelled
Test / API Integration Tests (push) Has been cancelled
Build & Push / Pipeline Tests (push) Waiting to run
Build & Push / Build & Push Docker Image (push) Blocked by required conditions
This commit is contained in:
@@ -19,7 +19,17 @@ describe('company schemas edge cases', () => {
|
||||
})
|
||||
|
||||
it('keeps contract, accounting, insurance, and pricing settings inside known enums', () => {
|
||||
expect(contractSettingsSchema.parse({ fuelPolicyType: 'FULL_TO_FULL', additionalDriverCharge: 'PER_DAY', taxRate: 20 })).toMatchObject({ fuelPolicyType: 'FULL_TO_FULL' })
|
||||
expect(contractSettingsSchema.parse({
|
||||
fuelPolicy: 'Return with the same fuel level.',
|
||||
fuelPolicyType: 'FULL_TO_FULL',
|
||||
additionalDriverPolicy: 'Additional drivers must be approved before pickup.',
|
||||
additionalDriverCharge: 'PER_DAY',
|
||||
taxRate: 20,
|
||||
})).toMatchObject({
|
||||
fuelPolicy: 'Return with the same fuel level.',
|
||||
fuelPolicyType: 'FULL_TO_FULL',
|
||||
additionalDriverPolicy: 'Additional drivers must be approved before pickup.',
|
||||
})
|
||||
expect(contractSettingsSchema.safeParse({ fuelPolicyType: 'CHAOS' }).success).toBe(false)
|
||||
expect(accountingSettingsSchema.parse({ reportingPeriod: 'MONTHLY', fiscalYearStart: 1, currency: 'MAD' })).toMatchObject({ fiscalYearStart: 1 })
|
||||
expect(accountingSettingsSchema.safeParse({ fiscalYearStart: 13 }).success).toBe(false)
|
||||
|
||||
Reference in New Issue
Block a user