test(salix): refs #7648 #7648 test:back
gitea/salix/pipeline/pr-master This commit looks good
Details
gitea/salix/pipeline/pr-master This commit looks good
Details
This commit is contained in:
parent
9193c784d0
commit
d160836eb0
|
@ -0,0 +1,8 @@
|
||||||
|
-- Place your SQL code here
|
||||||
|
-- Auto-generated SQL script #202406281423
|
||||||
|
INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId)
|
||||||
|
VALUES ('Entry','filter','READ','ALLOW','ROLE','$authenticated');
|
||||||
|
|
||||||
|
-- Auto-generated SQL script #202406281452
|
||||||
|
INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId)
|
||||||
|
VALUES ('Entry','getBuys','READ','ALLOW','ROLE','$authenticated');
|
|
@ -9,7 +9,8 @@ describe('Entry filter()', () => {
|
||||||
const ctx = {
|
const ctx = {
|
||||||
args: {
|
args: {
|
||||||
search: 1
|
search: 1
|
||||||
}
|
},
|
||||||
|
req: {accessToken: {userId: 9}}
|
||||||
};
|
};
|
||||||
|
|
||||||
const result = await models.Entry.filter(ctx, options);
|
const result = await models.Entry.filter(ctx, options);
|
||||||
|
@ -32,7 +33,8 @@ describe('Entry filter()', () => {
|
||||||
const ctx = {
|
const ctx = {
|
||||||
args: {
|
args: {
|
||||||
currencyFk: 1
|
currencyFk: 1
|
||||||
}
|
},
|
||||||
|
req: {accessToken: {userId: 9}}
|
||||||
};
|
};
|
||||||
|
|
||||||
const result = await models.Entry.filter(ctx, options);
|
const result = await models.Entry.filter(ctx, options);
|
||||||
|
@ -54,7 +56,8 @@ describe('Entry filter()', () => {
|
||||||
const ctx = {
|
const ctx = {
|
||||||
args: {
|
args: {
|
||||||
supplierFk: 2
|
supplierFk: 2
|
||||||
}
|
},
|
||||||
|
req: {accessToken: {userId: 9}}
|
||||||
};
|
};
|
||||||
|
|
||||||
const result = await models.Entry.filter(ctx, options);
|
const result = await models.Entry.filter(ctx, options);
|
||||||
|
@ -76,7 +79,8 @@ describe('Entry filter()', () => {
|
||||||
const ctx = {
|
const ctx = {
|
||||||
args: {
|
args: {
|
||||||
companyFk: 442
|
companyFk: 442
|
||||||
}
|
},
|
||||||
|
req: {accessToken: {userId: 9}}
|
||||||
};
|
};
|
||||||
|
|
||||||
const result = await models.Entry.filter(ctx, options);
|
const result = await models.Entry.filter(ctx, options);
|
||||||
|
@ -98,7 +102,8 @@ describe('Entry filter()', () => {
|
||||||
const ctx = {
|
const ctx = {
|
||||||
args: {
|
args: {
|
||||||
isBooked: true,
|
isBooked: true,
|
||||||
}
|
},
|
||||||
|
req: {accessToken: {userId: 9}}
|
||||||
};
|
};
|
||||||
|
|
||||||
const result = await models.Entry.filter(ctx, options);
|
const result = await models.Entry.filter(ctx, options);
|
||||||
|
@ -121,7 +126,8 @@ describe('Entry filter()', () => {
|
||||||
args: {
|
args: {
|
||||||
reference: 'movement',
|
reference: 'movement',
|
||||||
travelFk: '2'
|
travelFk: '2'
|
||||||
}
|
},
|
||||||
|
req: {accessToken: {userId: 9}}
|
||||||
};
|
};
|
||||||
|
|
||||||
const result = await models.Entry.filter(ctx, options);
|
const result = await models.Entry.filter(ctx, options);
|
||||||
|
|
|
@ -7,7 +7,14 @@ describe('entry getBuys()', () => {
|
||||||
const options = {transaction: tx};
|
const options = {transaction: tx};
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const result = await models.Entry.getBuys(entryId, options);
|
const ctx = {
|
||||||
|
args: {
|
||||||
|
search: 1
|
||||||
|
},
|
||||||
|
req: {accessToken: {userId: 2}}
|
||||||
|
};
|
||||||
|
|
||||||
|
const result = await models.Entry.getBuys(ctx, entryId, options);
|
||||||
|
|
||||||
const length = result.length;
|
const length = result.length;
|
||||||
const anyResult = result[Math.floor(Math.random() * Math.floor(length))];
|
const anyResult = result[Math.floor(Math.random() * Math.floor(length))];
|
||||||
|
|
Loading…
Reference in New Issue