5244-component_workerAutocomplete #1679
|
@ -1,12 +1,10 @@
|
||||||
const models = require('vn-loopback/server/server').models;
|
const models = require('vn-loopback/server/server').models;
|
||||||
|
|
||||||
describe('ticket-request getItemTypeWorker()', () => {
|
describe('ticket-request getItemTypeWorker()', () => {
|
||||||
const ctx = {req: {accessToken: {userId: 18}}};
|
|
||||||
|
|
||||||
it('should return the buyer as result', async() => {
|
it('should return the buyer as result', async() => {
|
||||||
const filter = {where: {firstName: 'buyer'}};
|
const filter = {where: {firstName: 'buyer'}};
|
||||||
|
|
||||||
const result = await models.TicketRequest.getItemTypeWorker(ctx, filter);
|
const result = await models.TicketRequest.getItemTypeWorker(filter);
|
||||||
|
|
||||||
expect(result.length).toEqual(1);
|
expect(result.length).toEqual(1);
|
||||||
});
|
});
|
||||||
|
@ -14,7 +12,7 @@ describe('ticket-request getItemTypeWorker()', () => {
|
||||||
it('should return the workers at itemType as result', async() => {
|
it('should return the workers at itemType as result', async() => {
|
||||||
const filter = {};
|
const filter = {};
|
||||||
|
|
||||||
const result = await models.TicketRequest.getItemTypeWorker(ctx, filter);
|
const result = await models.TicketRequest.getItemTypeWorker(filter);
|
||||||
|
|
||||||
expect(result.length).toBeGreaterThan(1);
|
expect(result.length).toBeGreaterThan(1);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue