added test of lastActiveTickets
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
4e36fd118e
commit
bf3391f7f2
|
@ -91,5 +91,6 @@
|
|||
"The observation type can't be repeated": "The observation type can't be repeated",
|
||||
"New ticket request has been created with price": "New ticket request has been created *'{{description}}'* for day *{{shipped}}*, with a quantity of *{{quantity}}* and a price of *{{price}} €*",
|
||||
"New ticket request has been created": "New ticket request has been created *'{{description}}'* for day *{{shipped}}*, with a quantity of *{{quantity}}*",
|
||||
"There's a new urgent ticket": "There's a new urgent ticket: [{{title}}](https://cau.verdnatura.es/WorkOrder.do?woMode=viewWO&woID={{issueId}})"
|
||||
"There's a new urgent ticket": "There's a new urgent ticket: [{{title}}](https://cau.verdnatura.es/WorkOrder.do?woMode=viewWO&woID={{issueId}})",
|
||||
"Swift / BIC cannot be empty": "Swift / BIC cannot be empty"
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
const app = require('vn-loopback/server/server');
|
||||
|
||||
describe('Client last active tickets', () => {
|
||||
it('should receive an array of last active tickets of Bruce Wayne', async() => {
|
||||
const ticketId = 22;
|
||||
const clientId = 109;
|
||||
const warehouseId = 5;
|
||||
const result = await app.models.Client.lastActiveTickets(clientId, ticketId, warehouseId);
|
||||
|
||||
const length = result.length;
|
||||
const anyResult = result[Math.floor(Math.random() * Math.floor(length))];
|
||||
|
||||
const properties = Object.keys(anyResult);
|
||||
|
||||
expect(properties.length).toEqual(9);
|
||||
expect(result.length).toEqual(3);
|
||||
});
|
||||
});
|
Loading…
Reference in New Issue