diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-20 21:42:06 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-20 21:42:06 +0300 |
commit | 6e4e1050d9dba2b7b2523fdd1768823ab85feef4 (patch) | |
tree | 78be5963ec075d80116a932011d695dd33910b4e /spec/frontend/vue_shared/components/filtered_search_bar/filtered_search_utils_spec.js | |
parent | 1ce776de4ae122aba3f349c02c17cebeaa8ecf07 (diff) |
Add latest changes from gitlab-org/gitlab@13-3-stable-ee
Diffstat (limited to 'spec/frontend/vue_shared/components/filtered_search_bar/filtered_search_utils_spec.js')
-rw-r--r-- | spec/frontend/vue_shared/components/filtered_search_bar/filtered_search_utils_spec.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/spec/frontend/vue_shared/components/filtered_search_bar/filtered_search_utils_spec.js b/spec/frontend/vue_shared/components/filtered_search_bar/filtered_search_utils_spec.js new file mode 100644 index 00000000000..a857f84adf1 --- /dev/null +++ b/spec/frontend/vue_shared/components/filtered_search_bar/filtered_search_utils_spec.js @@ -0,0 +1,19 @@ +import * as filteredSearchUtils from '~/vue_shared/components/filtered_search_bar/filtered_search_utils'; + +describe('Filtered Search Utils', () => { + describe('stripQuotes', () => { + it.each` + inputValue | outputValue + ${'"Foo Bar"'} | ${'Foo Bar'} + ${"'Foo Bar'"} | ${'Foo Bar'} + ${'FooBar'} | ${'FooBar'} + ${"Foo'Bar"} | ${"Foo'Bar"} + ${'Foo"Bar'} | ${'Foo"Bar'} + `( + 'returns string $outputValue when called with string $inputValue', + ({ inputValue, outputValue }) => { + expect(filteredSearchUtils.stripQuotes(inputValue)).toBe(outputValue); + }, + ); + }); +}); |