2019-01-24 08:08:28 +00:00
|
|
|
const app = require('vn-loopback/server/server');
|
2018-01-24 12:45:32 +00:00
|
|
|
|
2019-02-21 07:43:04 +00:00
|
|
|
describe('Client get', () => {
|
2019-01-11 11:25:53 +00:00
|
|
|
it('should call the card() method to receive a formated card of Bruce Wayne', async() => {
|
2018-03-08 11:23:51 +00:00
|
|
|
let id = 101;
|
2018-09-14 11:43:51 +00:00
|
|
|
let result = await app.models.Client.getCard(id);
|
2018-01-24 12:45:32 +00:00
|
|
|
|
2018-09-14 11:43:51 +00:00
|
|
|
expect(result.id).toEqual(101);
|
|
|
|
expect(result.name).toEqual('Bruce Wayne');
|
2019-03-25 14:16:56 +00:00
|
|
|
expect(result.debt).toEqual(329.26);
|
2018-01-24 12:45:32 +00:00
|
|
|
});
|
|
|
|
});
|