Chatwoot/app/javascript/widget/store/modules/specs/agent/getters.spec.js
Nithin David Thomas 83b0bb4062
Feature: As an end-user, I should be able to see the list of agents in the widget. (#461)
Co-authored-by: Pranav Raj S <pranavrajs@gmail.com>
2020-02-05 11:27:22 +05:30

30 lines
610 B
JavaScript

import { getters } from '../../agent';
import { agents } from './data';
describe('#getters', () => {
it('availableAgents', () => {
const state = {
records: agents,
};
expect(getters.availableAgents(state)).toEqual([
{
id: 1,
name: 'John',
avatar_url: '',
availability_status: 'online',
},
{
id: 3,
name: 'Pranav',
avatar_url: '',
availability_status: 'online',
},
{
id: 4,
name: 'Nithin',
avatar_url: '',
availability_status: 'online',
},
]);
});
});