refactor code
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Vicent Llopis 2023-04-18 08:26:26 +02:00
parent ce3e299d09
commit edc49ab5b3
1 changed files with 3 additions and 4 deletions

View File

@ -37,8 +37,7 @@ describe('Item editFixedPrice()', () => {
const options = {transaction: tx}; const options = {transaction: tx};
try { try {
const filter = {'it.categoryFk': 1}; const filter = {where: {'it.categoryFk': 1}};
const secondFilter = {where: {'it.categoryFk': 1}};
const ctx = { const ctx = {
args: { args: {
filter: filter filter: filter
@ -49,9 +48,9 @@ describe('Item editFixedPrice()', () => {
const field = 'rate2'; const field = 'rate2';
const newValue = 88; const newValue = 88;
await models.FixedPrice.editFixedPrice(ctx, field, newValue, null, filter, options); await models.FixedPrice.editFixedPrice(ctx, field, newValue, null, filter.where, options);
const [result] = await models.FixedPrice.filter(ctx, secondFilter, options); const [result] = await models.FixedPrice.filter(ctx, filter, options);
expect(result[field]).toEqual(newValue); expect(result[field]).toEqual(newValue);