feat: update backTest
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
cd6f0057a1
commit
0849f40df7
|
@ -1,13 +1,23 @@
|
|||
const models = require('vn-loopback/server/server').models;
|
||||
|
||||
describe('ticket-request deny()', () => {
|
||||
it('should return the dinied ticket request', async() => {
|
||||
it('should return the denied ticket request', async() => {
|
||||
const tx = await models.TicketRequest.beginTransaction({});
|
||||
|
||||
try {
|
||||
const options = {transaction: tx};
|
||||
|
||||
const ctx = {req: {accessToken: {userId: 9}}, args: {id: 4, observation: 'my observation'}};
|
||||
const ctx = {
|
||||
req: {
|
||||
accessToken: {userId: 9},
|
||||
headers: {origin: 'http://localhost'}
|
||||
},
|
||||
args: {id: 4, observation: 'my observation'},
|
||||
};
|
||||
|
||||
ctx.req.__ = value => {
|
||||
return value;
|
||||
};
|
||||
|
||||
const result = await models.TicketRequest.deny(ctx, options);
|
||||
|
||||
|
|
Loading…
Reference in New Issue