diff --git a/modules/client/back/methods/client/specs/updateAddress.spec.js b/modules/client/back/methods/client/specs/updateAddress.spec.js index e8d6bb8d8..233ab9ccb 100644 --- a/modules/client/back/methods/client/specs/updateAddress.spec.js +++ b/modules/client/back/methods/client/specs/updateAddress.spec.js @@ -158,7 +158,7 @@ describe('Address updateAddress', () => { } }); - fit('should update ticket observations when updateObservations is true', async() => { + it('should update ticket observations when updateObservations is true', async() => { const tx = await models.Client.beginTransaction({}); const client = 1103; const address = 123; @@ -197,12 +197,7 @@ describe('Address updateAddress', () => { where: {ticketFk: ticket, observationTypeFk: observationType} }, options); - // const address = await models.Address.findById(addressId, null, options); - - // const addressObservation = await models.addressObservation.findById(addressId, null, options); - - expect(updatedObservation).toEqual(addressObservation); - // expect(1).toEqual(1); + expect(updatedObservation.description).toEqual(addressObservation); await tx.rollback(); } catch (e) { diff --git a/modules/client/back/methods/client/updateAddress.js b/modules/client/back/methods/client/updateAddress.js index 69e288db3..e6e5adb45 100644 --- a/modules/client/back/methods/client/updateAddress.js +++ b/modules/client/back/methods/client/updateAddress.js @@ -148,7 +148,7 @@ module.exports = function(Self) { SET to2.description = ao.description WHERE ao.observationTypeFk = to2.observationTypeFk AND a.id = ? - AND t.shipped >= util.VN_CURDATE()`, [addressId]); + AND t.shipped >= util.VN_CURDATE()`, [addressId], myOptions); } return updatedAddress;