removed cron job that made rentals active. Now whether or not the rental is active is determined on the fly
This commit is contained in:
@@ -229,8 +229,11 @@ describe('RefundService', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it('should reject cancellation for active rental', () => {
|
||||
const rental = { ...baseRental, status: 'active' };
|
||||
it('should reject cancellation for active rental (computed from confirmed + past start)', () => {
|
||||
// Active status is now computed: confirmed + startDateTime in the past
|
||||
const pastDate = new Date();
|
||||
pastDate.setHours(pastDate.getHours() - 1); // 1 hour ago
|
||||
const rental = { ...baseRental, status: 'confirmed', startDateTime: pastDate };
|
||||
const result = RefundService.validateCancellationEligibility(rental, 100);
|
||||
|
||||
expect(result).toEqual({
|
||||
|
||||
Reference in New Issue
Block a user