chore: Update user account availability status (#6375)

This commit is contained in:
Muhsin Keloth
2023-02-07 00:37:31 +05:30
committed by GitHub
parent 6b839a0442
commit 5902c7a5e1
2 changed files with 25 additions and 1 deletions

View File

@@ -42,4 +42,19 @@ describe('#mutations', () => {
});
});
});
describe('#SET_CURRENT_USER_AVAILABILITY', () => {
const state = {
currentUser: {
id: 1,
accounts: [{ id: 1, availability_status: 'offline' }],
account_id: 1,
},
};
it('set availability status for current user', () => {
mutations[types.SET_CURRENT_USER_AVAILABILITY](state, 'online');
expect(state.currentUser.accounts[0].availability_status).toEqual(
'online'
);
});
});
});