refactor code
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
ce3e299d09
commit
edc49ab5b3
|
@ -37,8 +37,7 @@ describe('Item editFixedPrice()', () => {
|
|||
const options = {transaction: tx};
|
||||
|
||||
try {
|
||||
const filter = {'it.categoryFk': 1};
|
||||
const secondFilter = {where: {'it.categoryFk': 1}};
|
||||
const filter = {where: {'it.categoryFk': 1}};
|
||||
const ctx = {
|
||||
args: {
|
||||
filter: filter
|
||||
|
@ -49,9 +48,9 @@ describe('Item editFixedPrice()', () => {
|
|||
const field = 'rate2';
|
||||
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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue