Merge branch 'test' of https://gitea.verdnatura.es/verdnatura/salix into dev
gitea/salix/dev This commit looks good
Details
gitea/salix/dev This commit looks good
Details
This commit is contained in:
commit
09972f6597
|
@ -32,6 +32,8 @@ module.exports = Self => {
|
|||
|
||||
if (sender.name != recipient)
|
||||
return sendMessage(sender, to, message);
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
async function sendMessage(sender, channel, message) {
|
||||
|
|
|
@ -9,10 +9,10 @@ describe('chat send()', () => {
|
|||
expect(response.message).toEqual('Fake notification sent');
|
||||
});
|
||||
|
||||
it('should not return a response', async() => {
|
||||
it('should retrun false as response', async() => {
|
||||
let ctx = {req: {accessToken: {userId: 18}}};
|
||||
let response = await app.models.Chat.send(ctx, '@salesPerson', 'I changed something');
|
||||
|
||||
expect(response).toBeUndefined();
|
||||
expect(response).toBeFalsy();
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue