salix/services/loopback/common/methods/client/specs/getCard.spec.js

13 lines
419 B
JavaScript

const app = require(`${servicesDir}/client/server/server`);
describe('Client card', () => {
it('should call the card() method to receive a formated card of Bruce Wayne', async() => {
let id = 101;
let result = await app.models.Client.getCard(id);
expect(result.id).toEqual(101);
expect(result.name).toEqual('Bruce Wayne');
expect(result.debt).toEqual(1048.76);
});
});