Welcome to mirror list, hosted at ThFree Co, Russian Federation.

utils_spec.js « show « organizations « frontend « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 583f105c8c054c624f9cda4a6cc8d71c388bbc32 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import { buildDisplayListboxItem } from '~/organizations/show/utils';
import { RESOURCE_TYPE_PROJECTS } from '~/organizations/constants';
import { FILTER_FREQUENTLY_VISITED } from '~/organizations/show/constants';

describe('buildDisplayListboxItem', () => {
  it('returns list item in correct format', () => {
    const text = 'Frequently visited projects';

    expect(
      buildDisplayListboxItem({
        filter: FILTER_FREQUENTLY_VISITED,
        resourceType: RESOURCE_TYPE_PROJECTS,
        text,
      }),
    ).toEqual({
      text,
      value: 'frequently_visited_projects',
    });
  });
});