15 lines
482 B
JavaScript
15 lines
482 B
JavaScript
const app = require(`${serviceRoot}/server/server`);
|
|
|
|
describe('message send()', () => {
|
|
it('should call the send method and return the response', async() => {
|
|
let ctx = {req: {accessToken: {userId: 1}}};
|
|
let params = {
|
|
recipientFk: 1,
|
|
message: 'I changed something'
|
|
};
|
|
let response = await app.models.Message.send(ctx, params, {transaction: 'You'});
|
|
|
|
expect(response.message).toEqual(params.message);
|
|
});
|
|
});
|