feat(realtime): complete fake channel reply flow
This commit is contained in:
@@ -758,6 +758,22 @@ describe('#mutations', () => {
|
||||
});
|
||||
|
||||
describe('#UPDATE_CONVERSATION', () => {
|
||||
it('should ignore malformed realtime payloads without an id', () => {
|
||||
const state = {
|
||||
allConversations: [{ id: 1, status: 'open', meta: {} }],
|
||||
conversationFilters: {},
|
||||
};
|
||||
|
||||
mutations[types.UPDATE_CONVERSATION](state, {
|
||||
conversation: { id: 1 },
|
||||
message: { id: 2 },
|
||||
});
|
||||
|
||||
expect(state.allConversations).toEqual([
|
||||
{ id: 1, status: 'open', meta: {} },
|
||||
]);
|
||||
});
|
||||
|
||||
it('should update existing conversation', () => {
|
||||
const state = {
|
||||
allConversations: [
|
||||
|
||||
Reference in New Issue
Block a user