diff options
Diffstat (limited to 'spec/frontend/organizations/show/utils_spec.js')
-rw-r--r-- | spec/frontend/organizations/show/utils_spec.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/frontend/organizations/show/utils_spec.js b/spec/frontend/organizations/show/utils_spec.js new file mode 100644 index 00000000000..583f105c8c0 --- /dev/null +++ b/spec/frontend/organizations/show/utils_spec.js @@ -0,0 +1,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', + }); + }); +}); |