refactor: renombrada variable
gitea/salix/pipeline/head There was a failure building this commit Details

This commit is contained in:
Vicent Llopis 2022-10-26 09:04:53 +02:00
parent d1e2b1f7d5
commit c671540a7f
3 changed files with 8 additions and 8 deletions

View File

@ -79,11 +79,11 @@ describe('sale updatePrice()', () => {
const price = 5.4;
const originalSalesPersonMana = await models.WorkerMana.findById(18, null, options);
const manaComponent = await models.Component.findOne({where: {code: 'mana'}}, options);
const teamCLopez = 96;
const teamOne = 96;
const userId = ctx.req.accessToken.userId;
const business = await models.Business.findOne({where: {workerFk: userId}}, options);
await business.updateAttribute('departmentFk', teamCLopez, options);
await business.updateAttribute('departmentFk', teamOne, options);
await models.Sale.updatePrice(ctx, saleId, price, options);
const updatedSale = await models.Sale.findById(saleId, null, options);

View File

@ -12,11 +12,11 @@ describe('sale usesMana()', () => {
try {
const options = {transaction: tx};
const teamCLopez = 96;
const teamOne = 96;
const userId = ctx.req.accessToken.userId;
const business = await models.Business.findOne({where: {workerFk: userId}}, options);
await business.updateAttribute('departmentFk', teamCLopez, options);
await business.updateAttribute('departmentFk', teamOne, options);
const usesMana = await models.Sale.usesMana(ctx, options);

View File

@ -110,10 +110,10 @@ describe('sale updateDiscount()', () => {
const componentId = manaDiscount.id;
const manaCode = 'mana';
const teamCLopez = 96;
const teamOne = 96;
const userId = ctx.req.accessToken.userId;
const business = await models.Business.findOne({where: {workerFk: userId}}, options);
await business.updateAttribute('departmentFk', teamCLopez, options);
await business.updateAttribute('departmentFk', teamOne, options);
await models.Ticket.updateDiscount(ctx, ticketId, sales, newDiscount, manaCode, options);
@ -155,10 +155,10 @@ describe('sale updateDiscount()', () => {
const componentId = manaDiscount.id;
const manaCode = 'manaClaim';
const teamCLopez = 96;
const teamOne = 96;
const userId = ctx.req.accessToken.userId;
const business = await models.Business.findOne({where: {workerFk: userId}}, options);
await business.updateAttribute('departmentFk', teamCLopez, options);
await business.updateAttribute('departmentFk', teamOne, options);
await models.Ticket.updateDiscount(ctx, ticketId, sales, newDiscount, manaCode, options);