21 lines
627 B
JavaScript
21 lines
627 B
JavaScript
const app = require('../../../../../client/server/server');
|
|
const catchErrors = require('../../../../../../services/utils/jasmineHelpers').catchErrors;
|
|
|
|
describe('Client card', () => {
|
|
it('should call the card() method to receive a formated card of Bruce Wayne', done => {
|
|
let id = 1;
|
|
|
|
let callback = (error, result) => {
|
|
if (error) return catchErrors(done)(error);
|
|
|
|
expect(result).toEqual(jasmine.objectContaining({
|
|
id: 1,
|
|
name: 'Bruce Wayne'
|
|
}));
|
|
done();
|
|
};
|
|
|
|
app.models.Client.card(id, callback);
|
|
});
|
|
});
|