mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 14:47:53 +01:00
New inbox client (#10644)
* new inbox client * add tests for sendPrivateMessage returning the message * update DELETE user message tests * port v3 GET-inbox_messages * use v4 delete message route * sendPrivateMessage: return sent message * fix
This commit is contained in:
committed by
Sabe Jones
parent
64507a161e
commit
84329e5fad
@@ -100,7 +100,7 @@ describe('POST /members/send-private-message', () => {
|
||||
let receiver = await generateUser();
|
||||
// const initialNotifications = receiver.notifications.length;
|
||||
|
||||
await userToSendMessage.post('/members/send-private-message', {
|
||||
const response = await userToSendMessage.post('/members/send-private-message', {
|
||||
message: messageToSend,
|
||||
toUserId: receiver._id,
|
||||
});
|
||||
@@ -116,6 +116,9 @@ describe('POST /members/send-private-message', () => {
|
||||
return message.uuid === receiver._id && message.text === messageToSend;
|
||||
});
|
||||
|
||||
expect(response.message.text).to.deep.equal(sendersMessageInSendersInbox.text);
|
||||
expect(response.message.uuid).to.deep.equal(sendersMessageInSendersInbox.uuid);
|
||||
|
||||
// @TODO waiting for mobile support
|
||||
// expect(updatedReceiver.notifications.length).to.equal(initialNotifications + 1);
|
||||
// const notification = updatedReceiver.notifications[updatedReceiver.notifications.length - 1];
|
||||
|
||||
Reference in New Issue
Block a user