salix/modules/worker/back/methods/device/specs/checkUuid.spec.js

12 lines
390 B
JavaScript
Raw Normal View History

2019-06-03 07:20:20 +00:00
const app = require('vn-loopback/server/server');
describe('device checkUuid()', () => {
it('should return an state equal to false', async() => {
let ctx = {req: {accessToken: {userId: 9}}};
let data = {'uuid': '123', 'model': 'ihpne kike molon'};
let result = await app.models.Device.checkUuid(ctx, data);
expect(result.name).toBeFalsy();
});
});