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

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