chore: Use availability in dashboard presence toggle (#3212)

This commit is contained in:
Sojan Jose 2021-10-15 00:30:48 +05:30 committed by GitHub
parent ed25435ac2
commit cebd34053b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 22 additions and 19 deletions

View file

@ -115,9 +115,9 @@ describe('#actions', () => {
});
});
describe('#setCurrentUserAvailabilityStatus', () => {
describe('#setCurrentUserAvailability', () => {
it('sends correct mutations if user id is available', async () => {
actions.setCurrentUserAvailabilityStatus(
actions.setCurrentUserAvailability(
{
commit,
state: { currentUser: { id: 1 } },
@ -130,7 +130,7 @@ describe('#actions', () => {
});
it('does not send correct mutations if user id is not available', async () => {
actions.setCurrentUserAvailabilityStatus(
actions.setCurrentUserAvailability(
{
commit,
state: { currentUser: { id: 1 } },

View file

@ -20,11 +20,11 @@ describe('#getters', () => {
it('get', () => {
expect(
getters.getCurrentUserAvailabilityStatus({
getters.getCurrentUserAvailability({
currentAccountId: 1,
currentUser: {
id: 1,
accounts: [{ id: 1, availability_status: 'busy' }],
accounts: [{ id: 1, availability: 'busy' }],
},
})
).toEqual('busy');