Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 2580-fetched_tags_refactor
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Carlos Jimenez Ruiz 2021-01-28 15:10:54 +01:00
commit 4ab42e5850
4 changed files with 1353 additions and 1195 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@ -1,8 +1,7 @@
const app = require('vn-loopback/server/server');
const LoopBackContext = require('loopback-context');
// #2735 route updateVolume() returns inconsistent values
xdescribe('route updateVolume()', () => {
describe('route updateVolume()', () => {
const routeId = 1;
const userId = 50;
const activeCtx = {
@ -19,7 +18,6 @@ xdescribe('route updateVolume()', () => {
expect(route.m3).toEqual(1.8);
const ticket = await app.models.Ticket.findById(14);
await ticket.updateAttributes({routeFk: routeId});
await app.models.Route.updateVolume(ctx, routeId);
@ -30,6 +28,7 @@ xdescribe('route updateVolume()', () => {
const logs = await app.models.RouteLog.find({fields: ['id', 'newInstance']});
const m3Log = logs.filter(log => {
if (log.newInstance)
return log.newInstance.m3 === updatedRoute.m3;
});
const logIdToDestroy = m3Log[0].id;