replaced vague notes with specific intended use, also fixed modal on top of modal for reviews
This commit is contained in:
@@ -289,7 +289,6 @@ describe('Rentals Routes', () => {
|
||||
endDateTime: '2024-01-15T18:00:00.000Z',
|
||||
deliveryMethod: 'pickup',
|
||||
deliveryAddress: null,
|
||||
notes: 'Test rental',
|
||||
stripePaymentMethodId: 'pm_test123',
|
||||
};
|
||||
|
||||
|
||||
@@ -449,7 +449,6 @@ describe('EmailService', () => {
|
||||
totalAmount: 150.00,
|
||||
payoutAmount: 135.00,
|
||||
deliveryMethod: 'pickup',
|
||||
notes: 'Please have it ready by 9am',
|
||||
item: { name: 'Power Drill' }
|
||||
};
|
||||
|
||||
@@ -522,7 +521,6 @@ describe('EmailService', () => {
|
||||
totalAmount: 0,
|
||||
payoutAmount: 0,
|
||||
deliveryMethod: 'pickup',
|
||||
notes: null,
|
||||
item: { name: 'Free Item' }
|
||||
};
|
||||
|
||||
@@ -531,39 +529,6 @@ describe('EmailService', () => {
|
||||
expect(result.success).toBe(true);
|
||||
});
|
||||
|
||||
it('should handle missing rental notes', async () => {
|
||||
const mockOwner = {
|
||||
email: 'owner@example.com',
|
||||
firstName: 'John'
|
||||
};
|
||||
const mockRenter = {
|
||||
firstName: 'Jane',
|
||||
lastName: 'Doe'
|
||||
};
|
||||
|
||||
User.findByPk
|
||||
.mockResolvedValueOnce(mockOwner)
|
||||
.mockResolvedValueOnce(mockRenter);
|
||||
|
||||
const rental = {
|
||||
id: 1,
|
||||
ownerId: 10,
|
||||
renterId: 20,
|
||||
startDateTime: new Date('2024-12-01T10:00:00Z'),
|
||||
endDateTime: new Date('2024-12-03T10:00:00Z'),
|
||||
totalAmount: 100,
|
||||
payoutAmount: 90,
|
||||
deliveryMethod: 'delivery',
|
||||
notes: null, // No notes
|
||||
item: { name: 'Test Item' }
|
||||
};
|
||||
|
||||
const result = await emailService.sendRentalRequestEmail(rental);
|
||||
|
||||
expect(result.success).toBe(true);
|
||||
expect(mockSend).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('should generate correct approval URL', async () => {
|
||||
const mockOwner = {
|
||||
email: 'owner@example.com',
|
||||
@@ -589,7 +554,6 @@ describe('EmailService', () => {
|
||||
totalAmount: 100,
|
||||
payoutAmount: 90,
|
||||
deliveryMethod: 'pickup',
|
||||
notes: 'Test notes',
|
||||
item: { name: 'Test Item' }
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user