chore: Change the conversation bot status to pending (#2677)

fixes: #2649
This commit is contained in:
Sojan Jose
2021-07-21 22:02:43 +05:30
committed by GitHub
parent a0886d37bc
commit a7ca55c080
22 changed files with 87 additions and 54 deletions

View File

@@ -14,7 +14,7 @@ describe('#mutations', () => {
describe('#UPDATE_CONVERSATION_ATTRIBUTES', () => {
it('update status if it is same conversation', () => {
const state = { id: 1, status: 'bot' };
const state = { id: 1, status: 'pending' };
mutations.UPDATE_CONVERSATION_ATTRIBUTES(state, {
id: 1,
status: 'open',
@@ -22,12 +22,12 @@ describe('#mutations', () => {
expect(state).toEqual({ id: 1, status: 'open' });
});
it('doesnot update status if it is not the same conversation', () => {
const state = { id: 1, status: 'bot' };
const state = { id: 1, status: 'pending' };
mutations.UPDATE_CONVERSATION_ATTRIBUTES(state, {
id: 2,
status: 'open',
});
expect(state).toEqual({ id: 1, status: 'bot' });
expect(state).toEqual({ id: 1, status: 'pending' });
});
});