mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
res.respond: allow for thrid parameter (message), refactor shared ops responses and adapt tests
This commit is contained in:
@@ -3,7 +3,7 @@ import {
|
||||
generateUser,
|
||||
} from '../../helpers/common.helper';
|
||||
|
||||
describe('shared.ops.clearPMs', () => {
|
||||
describe('shared.ops.deletePM', () => {
|
||||
let user;
|
||||
|
||||
beforeEach(() => {
|
||||
@@ -13,7 +13,7 @@ describe('shared.ops.clearPMs', () => {
|
||||
|
||||
it('delete message', () => {
|
||||
expect(user.inbox.messages).to.not.eql({ second: 'message' });
|
||||
let response = deletePM(user, { params: { id: 'first' } });
|
||||
let [response] = deletePM(user, { params: { id: 'first' } });
|
||||
expect(user.inbox.messages).to.eql({ second: 'message' });
|
||||
expect(response).to.eql({ second: 'message' });
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user