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 = {
|
||||
args: {
|
||||
search: 1
|
||||
}
|
||||
},
|
||||
req: {accessToken: {userId: 9}}
|
||||
};
|
||||
|
||||
const result = await models.Entry.filter(ctx, options);
|
||||
|
@ -32,7 +33,8 @@ describe('Entry filter()', () => {
|
|||
const ctx = {
|
||||
args: {
|
||||
currencyFk: 1
|
||||
}
|
||||
},
|
||||
req: {accessToken: {userId: 9}}
|
||||
};
|
||||
|
||||
const result = await models.Entry.filter(ctx, options);
|
||||
|
@ -54,7 +56,8 @@ describe('Entry filter()', () => {
|
|||
const ctx = {
|
||||
args: {
|
||||
supplierFk: 2
|
||||
}
|
||||
},
|
||||
req: {accessToken: {userId: 9}}
|
||||
};
|
||||
|
||||
const result = await models.Entry.filter(ctx, options);
|
||||
|
@ -76,7 +79,8 @@ describe('Entry filter()', () => {
|
|||
const ctx = {
|
||||
args: {
|
||||
companyFk: 442
|
||||
}
|
||||
},
|
||||
req: {accessToken: {userId: 9}}
|
||||
};
|
||||
|
||||
const result = await models.Entry.filter(ctx, options);
|
||||
|
@ -98,7 +102,8 @@ describe('Entry filter()', () => {
|
|||
const ctx = {
|
||||
args: {
|
||||
isBooked: true,
|
||||
}
|
||||
},
|
||||
req: {accessToken: {userId: 9}}
|
||||
};
|
||||
|
||||
const result = await models.Entry.filter(ctx, options);
|
||||
|
@ -121,7 +126,8 @@ describe('Entry filter()', () => {
|
|||
args: {
|
||||
reference: 'movement',
|
||||
travelFk: '2'
|
||||
}
|
||||
},
|
||||
req: {accessToken: {userId: 9}}
|
||||
};
|
||||
|
||||
const result = await models.Entry.filter(ctx, options);
|
||||
|
|
|
@ -7,7 +7,14 @@ describe('entry getBuys()', () => {
|
|||
const options = {transaction: tx};
|
||||
|
||||
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 anyResult = result[Math.floor(Math.random() * Math.floor(length))];
|
||||
|
|
Loading…
Reference in New Issue