12 lines
426 B
JavaScript
12 lines
426 B
JavaScript
const app = require(`${servicesDir}/client/server/server`);
|
|
|
|
describe('message send()', () => {
|
|
it('should call the send method and return the response', async() => {
|
|
let ctx = {req: {accessToken: {userId: 1}}};
|
|
await app.models.Message.send('salesPerson', {message: 'I changed something'}, ctx)
|
|
.then(response => {
|
|
expect(response.sent).toEqual(1);
|
|
});
|
|
});
|
|
});
|