2022-10-11 01:57:18 +05:30
|
|
|
import { isUserBusy } from '~/set_status_modal/utils';
|
|
|
|
import { AVAILABILITY_STATUS } from '~/set_status_modal/constants';
|
2021-03-11 19:13:27 +05:30
|
|
|
|
|
|
|
describe('Set status modal utils', () => {
|
|
|
|
describe('isUserBusy', () => {
|
|
|
|
it.each`
|
|
|
|
value | result
|
|
|
|
${''} | ${false}
|
|
|
|
${'fake status'} | ${false}
|
|
|
|
${AVAILABILITY_STATUS.NOT_SET} | ${false}
|
|
|
|
${AVAILABILITY_STATUS.BUSY} | ${true}
|
|
|
|
`('with $value returns $result', ({ value, result }) => {
|
|
|
|
expect(isUserBusy(value)).toBe(result);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|