Chatwoot/app/javascript/dashboard/store/modules/specs/contactNotes/getters.spec.js
Nithin David Thomas fe2af370e0
Feat: Show notes panel on crm page (#2320)
* Feat: Show notes panel on CRM page

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2021-06-14 09:49:17 +05:30

24 lines
576 B
JavaScript

import { getters } from '../../contactNotes';
import notesData from './fixtures';
describe('#getters', () => {
it('getAllNotesByContact', () => {
const state = { records: { 1: notesData } };
expect(getters.getAllNotesByContact(state)(1)).toEqual(notesData);
});
it('getUIFlags', () => {
const state = {
uiFlags: {
isFetching: true,
isCreating: false,
isDeleting: false,
},
};
expect(getters.getUIFlags(state)).toEqual({
isFetching: true,
isCreating: false,
isDeleting: false,
});
});
});