Chatwoot/app/javascript/dashboard/store/modules/specs/teamMembers/mutations.spec.js
Nithin David Thomas 6a614a520b
chore: Sets up store for teams settings page (#1727)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2021-02-04 13:19:59 +05:30

12 lines
422 B
JavaScript

import { mutations, ADD_AGENTS_TO_TEAM } from '../../teamMembers';
import teamMembers from './fixtures';
describe('#mutations', () => {
describe('#ADD_AGENTS_TO_TEAM', () => {
it('Adds team members to records', () => {
const state = { records: {} };
mutations[ADD_AGENTS_TO_TEAM](state, { data: teamMembers[0], teamId: 1 });
expect(state.records).toEqual({ 1: teamMembers[0] });
});
});
});