refactor: renombrada variable
gitea/salix/pipeline/head There was a failure building this commit
Details
gitea/salix/pipeline/head There was a failure building this commit
Details
This commit is contained in:
parent
d1e2b1f7d5
commit
c671540a7f
|
@ -79,11 +79,11 @@ describe('sale updatePrice()', () => {
|
||||||
const price = 5.4;
|
const price = 5.4;
|
||||||
const originalSalesPersonMana = await models.WorkerMana.findById(18, null, options);
|
const originalSalesPersonMana = await models.WorkerMana.findById(18, null, options);
|
||||||
const manaComponent = await models.Component.findOne({where: {code: 'mana'}}, options);
|
const manaComponent = await models.Component.findOne({where: {code: 'mana'}}, options);
|
||||||
const teamCLopez = 96;
|
const teamOne = 96;
|
||||||
const userId = ctx.req.accessToken.userId;
|
const userId = ctx.req.accessToken.userId;
|
||||||
|
|
||||||
const business = await models.Business.findOne({where: {workerFk: userId}}, options);
|
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);
|
await models.Sale.updatePrice(ctx, saleId, price, options);
|
||||||
const updatedSale = await models.Sale.findById(saleId, null, options);
|
const updatedSale = await models.Sale.findById(saleId, null, options);
|
||||||
|
|
|
@ -12,11 +12,11 @@ describe('sale usesMana()', () => {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const options = {transaction: tx};
|
const options = {transaction: tx};
|
||||||
const teamCLopez = 96;
|
const teamOne = 96;
|
||||||
const userId = ctx.req.accessToken.userId;
|
const userId = ctx.req.accessToken.userId;
|
||||||
|
|
||||||
const business = await models.Business.findOne({where: {workerFk: userId}}, options);
|
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);
|
const usesMana = await models.Sale.usesMana(ctx, options);
|
||||||
|
|
||||||
|
|
|
@ -110,10 +110,10 @@ describe('sale updateDiscount()', () => {
|
||||||
const componentId = manaDiscount.id;
|
const componentId = manaDiscount.id;
|
||||||
const manaCode = 'mana';
|
const manaCode = 'mana';
|
||||||
|
|
||||||
const teamCLopez = 96;
|
const teamOne = 96;
|
||||||
const userId = ctx.req.accessToken.userId;
|
const userId = ctx.req.accessToken.userId;
|
||||||
const business = await models.Business.findOne({where: {workerFk: userId}}, options);
|
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);
|
await models.Ticket.updateDiscount(ctx, ticketId, sales, newDiscount, manaCode, options);
|
||||||
|
|
||||||
|
@ -155,10 +155,10 @@ describe('sale updateDiscount()', () => {
|
||||||
const componentId = manaDiscount.id;
|
const componentId = manaDiscount.id;
|
||||||
const manaCode = 'manaClaim';
|
const manaCode = 'manaClaim';
|
||||||
|
|
||||||
const teamCLopez = 96;
|
const teamOne = 96;
|
||||||
const userId = ctx.req.accessToken.userId;
|
const userId = ctx.req.accessToken.userId;
|
||||||
const business = await models.Business.findOne({where: {workerFk: userId}}, options);
|
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);
|
await models.Ticket.updateDiscount(ctx, ticketId, sales, newDiscount, manaCode, options);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue