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:
@@ -10,6 +10,7 @@ describe('ConditionCheckService', () => {
|
||||
|
||||
describe('submitConditionCheck', () => {
|
||||
// Set rental dates relative to current time for valid time window
|
||||
// Active status is computed: confirmed + startDateTime in the past
|
||||
const now = new Date();
|
||||
const mockRental = {
|
||||
id: 'rental-123',
|
||||
@@ -17,7 +18,7 @@ describe('ConditionCheckService', () => {
|
||||
renterId: 'renter-789',
|
||||
startDateTime: new Date(now.getTime() - 1000 * 60 * 60), // 1 hour ago
|
||||
endDateTime: new Date(now.getTime() + 1000 * 60 * 60 * 24), // 24 hours from now
|
||||
status: 'active'
|
||||
status: 'confirmed' // Will be computed as "active" since startDateTime is in the past
|
||||
};
|
||||
|
||||
const mockPhotos = ['/uploads/photo1.jpg', '/uploads/photo2.jpg'];
|
||||
|
||||
Reference in New Issue
Block a user