4270-route.create #1023

Merged
joan merged 13 commits from 4270-route.create into dev 2022-08-03 07:09:11 +00:00
1 changed files with 2 additions and 2 deletions
Showing only changes of commit 6f7a4fc5ff - Show all commits

View File

@ -3,7 +3,7 @@ const models = require('vn-loopback/server/server').models;
describe('route updateWorkCenter()', () => {
const routeId = 1;
it('should update the commissionWorkCenterFk from workerLabour.workCenterFK', async() => {
it('should set the commission work center if the worker has workCenter', async() => {
const tx = await models.Defaulter.beginTransaction({});
vicent marked this conversation as resolved Outdated

Es confuso iniciar la transacción en un modelo que no es el que vas a invocar en tu funcionalidad.

models.Defaulter vs models.Route

Es confuso iniciar la transacción en un modelo que no es el que vas a invocar en tu funcionalidad. models.Defaulter vs models.Route
try {
const developerId = 9;
@ -26,7 +26,7 @@ describe('route updateWorkCenter()', () => {
}
});
it('should update the commissionWorkCenterFk from defaultWorkCenterFk if workerLabour.workCenterFK is null', async() => {
it(`should set the commission work center equals default work center if the worker hasn't workCenter`, async() => {
vicent marked this conversation as resolved Outdated

Shoul set the default commision work center if that worker didn't have one yet

Shoul set the default commision work center if that worker didn't have one yet
const tx = await models.Defaulter.beginTransaction({});
try {
const noExistentId = 2;
vicent marked this conversation as resolved Outdated

¿Te refieres a el user "Customer" no tiene workCenter asignado? esta variable es confusa, dale un nombre que describa realmente lo que hace.

¿Te refieres a el user "Customer" no tiene workCenter asignado? esta variable es confusa, dale un nombre que describa realmente lo que hace.