summaryrefslogtreecommitdiff
path: root/spec/frontend/set_status_modal/utils_spec.js
blob: 1e918b75a986bba1dbc6478bbb25b182e2e7770c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import { isUserBusy } from '~/set_status_modal/utils';
import { AVAILABILITY_STATUS } from '~/set_status_modal/constants';

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);
    });
  });
});