You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ngcp-csc-ui/t/store/conversations.js

45 lines
1015 B

'use strict';
import ConversationsModule from '../../src/store/conversations';
import { assert } from 'chai';
describe('Conversations', function(){
it('should load conversations', function(){
let state = {
conversations: [
]
};
let data = [
{
"_links": {
},
"call_type": "cfu",
"caller": "43993010",
"type": "call"
},
{
"_links": {
},
"caller": "43993011",
"type": "fax"
}
];
ConversationsModule.mutations.loadConversations(state, data);
assert.deepEqual(state.conversations, [
{
"call_type": "cfu",
"caller": "43993010",
"type": "call forward"
},
{
"caller": "43993011",
"type": "fax"
}
]);
});
});