Chatwoot/app/javascript/dashboard/store/modules/specs/conversationWatchers/getters.spec.js
Nithin David Thomas 0d9ed0674b
feat: Add store for conversation watchers (#5808)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-11-08 09:33:14 -08:00

22 lines
541 B
JavaScript

import { getters } from '../../conversationWatchers';
import watchersData from './fixtures';
describe('#getters', () => {
it('getByConversationId', () => {
const state = { records: { 1: watchersData } };
expect(getters.getByConversationId(state)(1)).toEqual(watchersData);
});
it('getUIFlags', () => {
const state = {
uiFlags: {
isFetching: false,
isUpdating: false,
},
};
expect(getters.getUIFlags(state)).toEqual({
isFetching: false,
isUpdating: false,
});
});
});