debian-mirror-gitlab/spec/frontend/admin/abuse_reports/utils_spec.js
2023-05-27 22:25:52 +05:30

13 lines
540 B
JavaScript

import { FILTERED_SEARCH_TOKEN_CATEGORY } from '~/admin/abuse_reports/constants';
import { buildFilteredSearchCategoryToken } from '~/admin/abuse_reports/utils';
describe('buildFilteredSearchCategoryToken', () => {
it('adds correctly formatted options to FILTERED_SEARCH_TOKEN_CATEGORY', () => {
const categories = ['tuxedo', 'tabby'];
expect(buildFilteredSearchCategoryToken(categories)).toMatchObject({
...FILTERED_SEARCH_TOKEN_CATEGORY,
options: categories.map((c) => ({ value: c, title: c })),
});
});
});