changed field from availability to isAvailable

This commit is contained in:
jackiettran
2025-11-24 17:36:18 -05:00
parent bb16d659bd
commit 42a5412582
10 changed files with 19 additions and 19 deletions

View File

@@ -260,7 +260,7 @@ describe('Rentals Routes', () => {
id: 1,
name: 'Test Item',
ownerId: 2,
availability: true,
isAvailable: true,
pricePerHour: 10,
pricePerDay: 50,
};
@@ -340,7 +340,7 @@ describe('Rentals Routes', () => {
});
it('should return 400 for unavailable item', async () => {
Item.findByPk.mockResolvedValue({ ...mockItem, availability: false });
Item.findByPk.mockResolvedValue({ ...mockItem, isAvailable: false });
const response = await request(app)
.post('/rentals')
@@ -382,7 +382,7 @@ describe('Rentals Routes', () => {
Item.findByPk.mockResolvedValue({
id: 1,
ownerId: 2,
availability: true,
isAvailable: true,
pricePerHour: 0,
pricePerDay: 0
});