diff --git a/modules/agency/back/methods/zone/specs/editPrices.spec.js b/modules/agency/back/methods/zone/specs/editPrices.spec.js index 610496425..ad0541641 100644 --- a/modules/agency/back/methods/zone/specs/editPrices.spec.js +++ b/modules/agency/back/methods/zone/specs/editPrices.spec.js @@ -20,7 +20,6 @@ describe('agency editPrices()', () => { it('should apply price and bonus for a selected day', async() => { const delivered = new Date(); delivered.setHours(0, 0, 0, 0); - delivered.setDate(delivered.getDate() + 1); await app.models.Zone.editPrices(zoneId, delivered, 4.00, 2.00, 'Only this day'); const editedDays = await app.models.ZoneCalendar.find({ @@ -39,7 +38,6 @@ describe('agency editPrices()', () => { it('should apply price and bonus for all delivery days starting from selected day', async() => { const delivered = new Date(); delivered.setHours(0, 0, 0, 0); - delivered.setDate(delivered.getDate() + 1); await app.models.Zone.editPrices(1, delivered, 5.50, 1.00, 'From this day'); const editedDays = await app.models.ZoneCalendar.find({ @@ -53,7 +51,7 @@ describe('agency editPrices()', () => { const firstEditedDay = editedDays[0]; const lastEditedDay = editedDays[editedDays.length - 1]; - expect(editedDays.length).toEqual(4); + expect(editedDays.length).toEqual(5); expect(firstEditedDay.price).toEqual(5.50); expect(firstEditedDay.bonus).toEqual(1.00); expect(lastEditedDay.price).toEqual(5.50); @@ -63,7 +61,6 @@ describe('agency editPrices()', () => { it('should apply price and bonus for all delivery days', async() => { const delivered = new Date(); delivered.setHours(0, 0, 0, 0); - delivered.setDate(delivered.getDate() + 1); await app.models.Zone.editPrices(1, delivered, 7.00, 0.00, 'All days'); const editedDays = await app.models.ZoneCalendar.find({