28 lines
824 B
JavaScript
28 lines
824 B
JavaScript
const app = require('vn-loopback/server/server');
|
|
|
|
describe('ticket isEmpty()', () => {
|
|
it('should return false if the ticket contains any packages', async() => {
|
|
let result = await app.models.Ticket.isEmpty(3);
|
|
|
|
expect(result).toBeFalsy();
|
|
});
|
|
|
|
it('should return false if the ticket contains any services', async() => {
|
|
let result = await app.models.Ticket.isEmpty(8);
|
|
|
|
expect(result).toBeFalsy();
|
|
});
|
|
|
|
it('should return false if the ticket contains any purchase request', async() => {
|
|
let result = await app.models.Ticket.isEmpty(11);
|
|
|
|
expect(result).toBeFalsy();
|
|
});
|
|
|
|
it('should return false if the ticket contains any sale', async() => {
|
|
let result = await app.models.Ticket.isEmpty(4);
|
|
|
|
expect(result).toBeFalsy();
|
|
});
|
|
});
|