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

13 lines
417 B
JavaScript
Raw Normal View History

const app = require(`${servicesDir}/client/server/server`);
2018-01-24 12:45:32 +00:00
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);
2018-01-24 12:45:32 +00:00
expect(result.id).toEqual(101);
expect(result.name).toEqual('Bruce Wayne');
2018-10-16 12:44:48 +00:00
expect(result.debt).toEqual(579.1);
2018-01-24 12:45:32 +00:00
});
});