mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-01 11:37:58 +00:00
34 lines
766 B
JavaScript
34 lines
766 B
JavaScript
import { getters } from '../../userNotificationSettings';
|
|
|
|
describe('#getters', () => {
|
|
it('getSelectedEmailFlags', () => {
|
|
const state = {
|
|
record: {
|
|
selected_email_flags: ['conversation_creation'],
|
|
},
|
|
};
|
|
expect(getters.getSelectedEmailFlags(state)).toEqual([
|
|
'conversation_creation',
|
|
]);
|
|
});
|
|
|
|
it('getUIFlags', () => {
|
|
const state = {
|
|
uiFlags: {
|
|
fetchingList: false,
|
|
fetchingItem: false,
|
|
creatingItem: false,
|
|
updatingItem: false,
|
|
deletingItem: false,
|
|
},
|
|
};
|
|
expect(getters.getUIFlags(state)).toEqual({
|
|
fetchingList: false,
|
|
fetchingItem: false,
|
|
creatingItem: false,
|
|
updatingItem: false,
|
|
deletingItem: false,
|
|
});
|
|
});
|
|
});
|